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

Method internalCleanup

source/kernel/kthread.cpp:47–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void KThread::internalCleanup() {
48 {
49 BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(this->waitingForSignalToEndCond);
50 BOXEDWINE_CONDITION_SIGNAL_ALL(this->waitingForSignalToEndCond);
51 }
52 if (!KSystem::shutingDown && this->clear_child_tid && this->process && memory->canWrite(this->clear_child_tid, 4)) {
53 memory->writed(this->clear_child_tid, 0);
54 this->futex(this->clear_child_tid, 1, 0xffffffff, 0, 0, 0, false);
55 }
56 this->clear_child_tid = 0;
57#ifndef BOXEDWINE_MULTI_THREADED
58 if (this->waitingCond) {
59 BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(*this->waitingCond);
60 this->waitThreadNode.remove();
61 this->waitingCond = nullptr;
62 }
63#endif
64 this->clearFutexes();
65 this->exitRobustList();
66 this->robustList = 0;
67 if (this->process) {
68 this->process->removeThread(this);
69 }
70 unscheduleThread(this);
71}
72
73void KThread::reset() {
74 memory->threadCleanup(id);

Callers 1

~KThreadMethod · 0.95

Calls 8

futexMethod · 0.95
clearFutexesMethod · 0.95
exitRobustListMethod · 0.95
removeThreadMethod · 0.80
unscheduleThreadFunction · 0.70
canWriteMethod · 0.45
writedMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected