mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Use thread_local_cleaner API in os2
This commit is contained in:
@@ -61,3 +61,8 @@ TEMP_ALLOCATOR_GUARD :: #force_inline proc(loc := #caller_location) -> (runtime.
|
|||||||
global_default_temp_allocator_index = (global_default_temp_allocator_index+1)%MAX_TEMP_ARENA_COUNT
|
global_default_temp_allocator_index = (global_default_temp_allocator_index+1)%MAX_TEMP_ARENA_COUNT
|
||||||
return tmp, loc
|
return tmp, loc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@(init, private)
|
||||||
|
init_thread_local_cleaner :: proc() {
|
||||||
|
runtime.add_thread_local_cleaner(temp_allocator_fini)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user