kernel/source/scheduler/scheduler.cpp
// this should be called once per cpu
this should be called once per cpu
this should be called once per cpu
void init()
	{
		calibrateTickTimer();
		auto ss = getSchedState();
		ss->IdleThread = createThread(getKernelProcess(), idle_worker);
		ss->CurrentThread = ss->IdleThread;
		ss->ThreadList = nx::list<Thread*>();
		ss->BlockedThreads = nx::array<Thread*>();
		ss->DestructionQueue = nx::list<Thread*>();
		ss->ProcessList = nx::list<Process*>();
		addThread(createThread(getKernelProcess(), death_destroyer_of_threads, (void*) ss));
		log("sched", "scheduler initialised");
	}
void init ( ) { calibrateTickTimer ( ) ; auto ss = getSchedState ( ) ; ss -> IdleThread = createThread ( getKernelProcess ( ) , idle_worker ) ; ss -> CurrentThread = ss -> IdleThread ; ss -> ThreadList = nx :: list < Thread * > ( ) ; ss -> BlockedThreads = nx :: array < Thread * > ( ) ; ss -> DestructionQueue = nx :: list < Thread * > ( ) ; ss -> ProcessList = nx :: list < Process * > ( ) ; addThread ( createThread ( getKernelProcess ( ) , death_destroyer_of_threads , ( void * ) ss ) ) ; log ( " " , " " ) ; }
this should be called once per cpu
this should be called once per cpu
// add our own worker thread.