now crazy mode
This commit is contained in:
@@ -52,7 +52,7 @@ void Thread::resume(Thread *next) {
|
|||||||
context_switch(&next->context, &context);
|
context_switch(&next->context, &context);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* operator new(size_t sz)
|
void* Thread::operator new(size_t sz) noexcept
|
||||||
{
|
{
|
||||||
if (sz == 0)
|
if (sz == 0)
|
||||||
++sz; // avoid std::malloc(0) which may return nullptr on success
|
++sz; // avoid std::malloc(0) which may return nullptr on success
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ class Thread {
|
|||||||
void* user;
|
void* user;
|
||||||
void* isr;
|
void* isr;
|
||||||
} StackPointer;
|
} StackPointer;
|
||||||
|
void* operator new ( size_t count )noexcept;
|
||||||
|
|
||||||
/*! \brief Unique thread id */
|
/*! \brief Unique thread id */
|
||||||
const size_t id;
|
const size_t id;
|
||||||
@@ -118,5 +119,4 @@ class Thread {
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
void* operator new ( size_t count );
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user