thread: Properly clean up meta data of main thread

This commit is contained in:
Tobias Brunner 2014-03-07 18:27:22 +01:00
parent d517a9893e
commit 0d30d73eb9
1 changed files with 2 additions and 0 deletions

View File

@ -496,6 +496,8 @@ void threads_deinit()
dummy1->destroy(dummy1);
main_thread->mutex->lock(main_thread->mutex);
main_thread->terminated = TRUE;
main_thread->detached_or_joined = TRUE;
thread_destroy(main_thread);
current_thread->destroy(current_thread);
id_mutex->destroy(id_mutex);