MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / scheduleThread

Function scheduleThread

source/kernel/kscheduler.cpp:95–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void scheduleThread(KThread* thread) {
96#ifdef _DEBUG
97 if (thread->waitingCond) {
98 kpanic("can't schedule a thread that is waiting");
99 }
100 if (thread->condTimer.active) {
101 kpanic("can't schedule a thread that is waiting on a timer");
102 }
103#endif
104 thread->cpu->yield = false;
105 scheduledThreads.addToFront(&thread->scheduledThreadNode);
106}
107
108void unscheduleThread(KThread* thread) {
109 thread->scheduledThreadNode.remove();

Callers 5

runSignalMethod · 0.70
startProcessMethod · 0.70
cloneMethod · 0.70
doLockedIncThreadFunction · 0.50
signalThreadMethod · 0.50

Calls 2

kpanicFunction · 0.85
addToFrontMethod · 0.80

Tested by 1

doLockedIncThreadFunction · 0.40