MCPcopy Create free account
hub / github.com/cemu-project/Cemu / cancelWait

Method cancelWait

src/Cafe/OS/libs/coreinit/coreinit_ThreadQueue.cpp:33–41  ·  view source on GitHub ↗

remove thread from wait queue and wake it up

Source from the content-addressed store, hash-verified

31
32 // remove thread from wait queue and wake it up
33 void OSThreadQueueInternal::cancelWait(OSThread_t* thread)
34 {
35 cemu_assert_debug(__OSHasSchedulerLock());
36 this->removeThread(thread, &thread->waitQueueLink);
37 thread->state = OSThread_t::THREAD_STATE::STATE_READY;
38 thread->currentWaitQueue = nullptr;
39 coreinit::__OSAddReadyThreadToRunQueue(thread);
40 // todo - if waking up a thread on the same core with higher priority, reschedule
41 }
42
43 void OSThreadQueueInternal::addThread(OSThread_t* thread, OSThreadLink* threadLink)
44 {

Callers 1

Calls 4

removeThreadMethod · 0.95
cemu_assert_debugFunction · 0.85
__OSHasSchedulerLockFunction · 0.85

Tested by

no test coverage detected