fixed scheduler in vault. insert borderline reference
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user