mirror of
https://github.com/Ed94/metadesk.git
synced 2026-08-05 07:08:45 +00:00
its compiling... (prepping for runtime testing)
This commit is contained in:
@@ -5,6 +5,24 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
////////////////////////////////
|
||||
// Context
|
||||
|
||||
void init(Context* ctx)
|
||||
{
|
||||
if (ctx->backing[0].proc != nullptr) {
|
||||
tctx_init_and_equip_alloc(& ctx->thread_ctx, ctx->backing[0]);
|
||||
}
|
||||
else {
|
||||
tctx_init_and_equip(& ctx->thread_ctx);
|
||||
}
|
||||
}
|
||||
|
||||
void deinit(Context* ctx)
|
||||
{
|
||||
tctx_release();
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Message Type Functions
|
||||
|
||||
|
||||
@@ -221,6 +221,22 @@ struct ParseResult
|
||||
MsgList msgs;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
// Context
|
||||
|
||||
typedef struct Context Context;
|
||||
struct Context
|
||||
{
|
||||
// Note: Only used so far as the first fallback if the user did not preset the thread_context's arenas
|
||||
// Otherwise it will just reserve its own Arena backed by chained virutal address space
|
||||
AllocatorInfo backing[2];
|
||||
|
||||
// Its recommended that the user hooks up
|
||||
// their own arena allocators to the thread context
|
||||
// which will be utilized for thread local scratch arena
|
||||
TCTX thread_ctx;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Globals
|
||||
|
||||
@@ -241,6 +257,12 @@ nil_node()
|
||||
return &nil;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
// Context lifetime Functios
|
||||
|
||||
MD_API void init (Context* ctx);
|
||||
MD_API void deinit(Context* ctx);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Message Type Functions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user