struct Thread; // hacky fwd declare struct Thread_Context { ExpandableArena* temp; // Used for temporary allocations, scratch space. ExpandableArena* arena; // general purpose local arena Allocator allocator; s32 thread_idx; u16 _padding0; u16 GPAllocator_alignment = 16; // Logger logger; // Stack_Trace* stack_trace; Array child_threads; // maybe should be linked-list? Thread* thread_that_created_me = nullptr; // so we can remove from above array string thread_name; }; // C_LINKAGE thread_static TCTX* tctx_thread_local; thread_static Thread_Context* thread_local_context; Thread_Context* get_thread_context (); internal void Bootstrap_Main_Thread_Context ();