mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 05:48:40 +00:00
sketch out 'root cache' in hash store
This commit is contained in:
@@ -58,20 +58,6 @@ hs_init(void)
|
||||
hs_shared->evictor_thread = os_thread_launch(hs_evictor_thread__entry_point, 0, 0);
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Thread Context Initialization
|
||||
|
||||
internal void
|
||||
hs_tctx_ensure_inited(void)
|
||||
{
|
||||
if(hs_tctx == 0)
|
||||
{
|
||||
Arena *arena = arena_alloc();
|
||||
hs_tctx = push_array(arena, HS_TCTX, 1);
|
||||
hs_tctx->arena = arena;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Cache Submission
|
||||
|
||||
@@ -203,7 +189,12 @@ hs_submit_data(U128 key, Arena **data_arena, String8 data)
|
||||
internal HS_Scope *
|
||||
hs_scope_open(void)
|
||||
{
|
||||
hs_tctx_ensure_inited();
|
||||
if(hs_tctx == 0)
|
||||
{
|
||||
Arena *arena = arena_alloc();
|
||||
hs_tctx = push_array(arena, HS_TCTX, 1);
|
||||
hs_tctx->arena = arena;
|
||||
}
|
||||
HS_Scope *scope = hs_tctx->free_scope;
|
||||
if(scope)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user