test2
This commit is contained in:
@@ -27,6 +27,7 @@ void Dispatcher::go(Thread *first) {
|
||||
}
|
||||
|
||||
void Dispatcher::dispatch(Thread *next) {
|
||||
//lifePointer[Core::getID()] = next;
|
||||
lifePointer[Core::getID()]->resume(next);
|
||||
Thread* tmp = lifePointer[Core::getID()];
|
||||
lifePointer[Core::getID()] = next;
|
||||
tmp->resume(next);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,10 @@ Thread::Thread(void* tos) {
|
||||
|
||||
#include "../thread/scheduler.h"
|
||||
void Thread::resume(Thread* next) {
|
||||
Guarded g = Guard::enter();
|
||||
Context *from = &g.vault().sch.active()->context;
|
||||
Context *from = &this->context;
|
||||
Context *to = &next->context;
|
||||
|
||||
g.vault().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);
|
||||
|
||||
Reference in New Issue
Block a user