22 lines
597 B
C
22 lines
597 B
C
#pragma once
|
|
|
|
#include <Core/Common/CoreTypes.h>
|
|
#include <Core/Memory/MemoryArena.h>
|
|
|
|
struct thread_context
|
|
{
|
|
Arena* ScratchArenas[2];
|
|
|
|
char ThreadName[64];
|
|
uint8 ThreadNameSize;
|
|
};
|
|
|
|
thread_context* thread_context_alloc();
|
|
void thread_context_release(NonNullPtr<thread_context> ctx);
|
|
void thread_context_select(NonNullPtr<thread_context> ctx);
|
|
thread_context* thread_context_current();
|
|
|
|
Arena* thread_context_get_scratch(Arena** conflicts, size_t count);
|
|
TempArena scratch_begin(Arena** conflicts, size_t count);
|
|
void scratch_end(TempArena scratch);
|