| 616 | } |
| 617 | |
| 618 | U32 KProcess::exit(KThread* thread, U32 code) { |
| 619 | this->exitCode = code; |
| 620 | if (this->getThreadCount()==1) |
| 621 | return this->exitgroup(thread, code); |
| 622 | |
| 623 | thread->cpu->yield = true; |
| 624 | thread->cleanup(); // will unschedule the thread |
| 625 | terminateCurrentThread(thread); |
| 626 | |
| 627 | return 0; |
| 628 | } |
| 629 | |
| 630 | KFileDescriptorPtr KProcess::getFileDescriptor(FD handle) { |
| 631 | BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(fdsMutex); |
no test coverage detected