rt: Change the way the kernel exits to avoid pthread leaks

This makes the kernel join every scheduler thread before exiting in order to
ensure that all threads are completely terminated before the process exits. On
my machine, for 32-bit targets, this was causing regular valgrind errors.
This commit is contained in:
Brian Anderson
2012-02-27 13:36:54 -08:00
parent e4c027446e
commit b3f77bf927
5 changed files with 42 additions and 26 deletions

View File

@@ -320,7 +320,6 @@ rust_task_thread::create_task(rust_task *spawner, const char *name,
void rust_task_thread::run() {
this->start_main_loop();
detach();
sched->release_task_thread();
}