20 lines
494 B
C
20 lines
494 B
C
|
/* date = June 21st 2023 6:51 pm */
|
||
|
|
||
|
#ifndef CORE_THREAD_CONTEXT_H
|
||
|
#define CORE_THREAD_CONTEXT_H
|
||
|
|
||
|
struct thread_context
|
||
|
{
|
||
|
memory_arena Arenas[2];
|
||
|
};
|
||
|
|
||
|
//- sixten: Thread state management
|
||
|
static void SetThreadContext(thread_context *Context);
|
||
|
static thread_context *GetThreadContext(void);
|
||
|
|
||
|
//- sixten: Scratch
|
||
|
static temporary_memory GetScratch(memory_arena **Conflicts = 0, u64 ConflictCount = 0);
|
||
|
#define ReleaseScratch(Scratch) EndTemporaryMemory(Scratch)
|
||
|
|
||
|
#endif //CORE_THREAD_CONTEXT_H
|