fixed scheduler in vault. insert borderline reference

This commit is contained in:
Simon
2025-07-08 01:17:34 +02:00
parent 68f0381c01
commit 698d0c155b
5 changed files with 12 additions and 19 deletions

View File

@@ -3,7 +3,7 @@
#include "thread.h"
#include "../debug/output.h"
#include "../arch/context.h"
#include "interrupt/guard.h"
// Alias to simplify stuff
typedef void (*kickoff_t)(void*);
@@ -17,12 +17,12 @@ Thread::Thread(void* tos) {
}
#include "../thread/scheduler.h"
extern Scheduler sch;
void Thread::resume(Thread* next) {
Context *from = &sch.active()->context;
Guarded g = Guard::enter();
Context *from = &g.vault().sch.active()->context;
Context *to = &next->context;
sch.dispatcher.lifePointer[Core::getID()] = next;
g.vault().sch.dispatcher.lifePointer[Core::getID()] = next;
DBG << "from: " << hex << from << endl;
DBG << "to : " << hex << to << endl << flush;
context_switch(to, from);

View File

@@ -16,7 +16,6 @@
#include "../arch/context.h"
#include "../object/queue.h"
#include "../types.h"
#include "../interrupt/guard.h"
/*! \brief The Thread is an object used by the scheduler.
* \ingroup thread
*/