2023-06-21 16:59:36 +00:00
|
|
|
/* date = June 21st 2023 6:51 pm */
|
|
|
|
|
|
|
|
#ifndef CORE_THREAD_CONTEXT_H
|
|
|
|
#define CORE_THREAD_CONTEXT_H
|
|
|
|
|
|
|
|
struct thread_context
|
|
|
|
{
|
2023-12-23 07:27:22 +00:00
|
|
|
arena *Arenas[2];
|
2023-06-21 16:59:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//- sixten: Thread state management
|
|
|
|
static void SetThreadContext(thread_context *Context);
|
|
|
|
static thread_context *GetThreadContext(void);
|
|
|
|
|
|
|
|
//- sixten: Scratch
|
2023-12-23 07:27:22 +00:00
|
|
|
static temp GetScratch(arena **Conflicts = 0, u64 ConflictCount = 0);
|
|
|
|
#define ReleaseScratch(Scratch) EndTemp(Scratch)
|
2023-06-21 16:59:36 +00:00
|
|
|
|
|
|
|
#endif //CORE_THREAD_CONTEXT_H
|