more or less works (with kill)
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
// vim: set noet ts=4 sw=4:
|
||||
|
||||
#include "scheduler.h"
|
||||
#include "../arch/lapic.h"
|
||||
#include "dispatcher.h"
|
||||
#include "../interrupt/guard.h"
|
||||
#include "../debug/output.h"
|
||||
|
||||
Queue<Thread> readyList = Queue<Thread>();
|
||||
|
||||
@@ -39,6 +43,17 @@ void Scheduler::exit() {
|
||||
void Scheduler::kill(Thread* that) {
|
||||
readyList.remove(that);
|
||||
that->kill_flag = true;
|
||||
|
||||
DBG << "kill..." << flush;
|
||||
|
||||
for(uint8_t i=0;i<Core::MAX; i++)
|
||||
if(dispatcher.lifePointer[i] == that){
|
||||
LAPIC::IPI::send(i, Core::Interrupt::Vector::ASSASSIN);
|
||||
DBG << "found thread on Core << dec << static_cast<int>(i) << "! killing...\n" << flush;
|
||||
return;
|
||||
}
|
||||
|
||||
DBG << "not found\n" << flush;
|
||||
}
|
||||
|
||||
bool Scheduler::isActive(const Thread* thread, unsigned int* cpu) {
|
||||
|
||||
Reference in New Issue
Block a user