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

Method deleteThread

source/kernel/kprocess.cpp:230–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void KProcess::deleteThread(KThread* thread) {
231 thread->cleanup();
232 if (this->threads.size() == 0) {
233 cleanupProcess();
234 delete this->memory; // this might call KThread::currentThread, so don't delete thread before this
235 this->memory = nullptr;
236 }
237 delete thread;
238 // don't call into getProcess while holding threadsCondition
239 if (!this->terminated && this->getThreadCount() == 0) {
240 KProcessPtr parent = KSystem::getProcess(this->parentId);
241 if (!parent || parent->getThreadCount() == 0) {
242 KSystem::eraseProcess(this->id);
243 }
244 }
245}
246
247FsOpenNode* openCommandLine(const std::shared_ptr<FsNode>& node, U32 flags, U32 data) {
248 return new BufferAccess(node, flags, KThread::currentThread()->process->commandLine);

Callers 2

platformThreadFunction · 0.80
tearDownFunction · 0.80

Calls 3

getThreadCountMethod · 0.95
cleanupMethod · 0.45
sizeMethod · 0.45

Tested by 1

tearDownFunction · 0.64