20 #ifndef PERPROCESSORSCHEDULER_H 21 #define PERPROCESSORSCHEDULER_H 25 #include "pedigree/kernel/compiler.h" 26 #include "pedigree/kernel/machine/TimerHandler.h" 27 #include "pedigree/kernel/process/ConditionVariable.h" 28 #include "pedigree/kernel/process/Mutex.h" 29 #include "pedigree/kernel/process/Thread.h" 30 #include "pedigree/kernel/processor/state_forward.h" 31 #include "pedigree/kernel/processor/types.h" 32 #include "pedigree/kernel/utilities/List.h" 47 void initialise(
Thread *pThread);
62 void checkEventState(uintptr_t userStack);
66 void eventHandlerReturned()
NORETURN;
76 bool bUsermode,
void *pStack);
81 void addThread(
Thread *pThread, SyscallState &state);
95 void timer(uint64_t delta, InterruptState &state);
97 void removeThread(
Thread *pThread);
99 void threadStatusChanged(
Thread *pThread);
101 void setIdle(
Thread *pThread);
115 static void deleteThreadThenRestoreState(
116 Thread *pThread, SchedulerState &newState,
117 volatile uintptr_t *pLock = 0)
NORETURN;
119 static void deleteThread(
Thread *pThread);
124 Mutex m_NewThreadDataLock;
129 static int processorAddThread(
void *instance)
NORETURN;
virtual void timer(uint64_t delta, InterruptState &state)=0
int(* ThreadStartFunc)(void *)
SchedulingAlgorithm * m_pSchedulingAlgorithm