#include "thread/Thread.h" #include #include static Atomic g_next_id; LinkedList g_threads; void Thread::init() { g_next_id = 1; } Result new_thread() { Thread* thread = TRY(make()); thread->id = g_next_id++; return thread; }