add ringswitch stuff

This commit is contained in:
2025-11-26 02:48:46 +01:00
parent a7b488f270
commit 2b0257f849
3 changed files with 47 additions and 3 deletions

View File

@@ -28,12 +28,15 @@ class Thread {
/*! \brief pointer to the next element of the readylist
*/
Thread* queue_link;
bool isKernel;
void* start;
friend class Queue<Thread>;
friend class Semaphore;
/*! \brief Memory reserved for this threads stack
*/
alignas(16) char reserved_stack_space[STACK_SIZE];
alignas(16) char reserved_stack_space_user[STACK_SIZE];
alignas(16) char reserved_stack_space_isr[STACK_SIZE];
struct{
void* user;
@@ -80,6 +83,7 @@ class Thread {
*
*/
explicit Thread();
explicit Thread(bool kernel, void * start = nullptr);
/*! \brief Activates the first thread on this CPU.
*