write kernel sp to tss in dispatcher

This commit is contained in:
2025-11-26 06:46:19 +01:00
parent 4ffae9e1f0
commit 3808f494af
7 changed files with 21 additions and 14 deletions

View File

@@ -28,7 +28,7 @@ class Thread {
/*! \brief pointer to the next element of the readylist
*/
Thread* queue_link;
bool isKernel = true;
bool isKernel;
void* start;
friend class Queue<Thread>;
@@ -38,11 +38,6 @@ class Thread {
alignas(16) char reserved_stack_space_user[STACK_SIZE];
alignas(16) char reserved_stack_space_isr[STACK_SIZE];
struct{
void* user;
void* isr;
} StackPointer;
protected:
/*! \brief Context of the thread, used for saving and restoring the register
* values when context switching.
@@ -70,6 +65,11 @@ class Thread {
static void kickoffUsermode (Thread *object);
public:
struct{
void* user;
void* isr;
} StackPointer;
/*! \brief Unique thread id */
const size_t id;