| 30 | thread_local KThread* KThread::runningThread; |
| 31 | |
| 32 | KThread::~KThread() { |
| 33 | for (auto& callback : callbacksOnExit) { |
| 34 | callback(id); |
| 35 | } |
| 36 | this->internalCleanup(); |
| 37 | CPU* cpu = this->cpu; |
| 38 | this->cpu = nullptr; |
| 39 | delete cpu; |
| 40 | } |
| 41 | |
| 42 | void KThread::cleanup() { |
| 43 | memory->threadCleanup(id); |
nothing calls this directly
no test coverage detected