diff --git a/src/thread/thread.c b/src/thread/thread.c index c332d42..1bb1680 100644 --- a/src/thread/thread.c +++ b/src/thread/thread.c @@ -282,6 +282,7 @@ void __attribute__((constructor)) setup_main_thread() main->id = main; main->status = 0; main->retvalue = NULL; + main->last_waited = NULL; running = main; // Create a context with static stack to clean everything at the end.