diff --git a/core/runtime/procs_everything_else.odin b/core/runtime/procs_everything_else.odin index 6d982a13e..8423fc451 100644 --- a/core/runtime/procs_everything_else.odin +++ b/core/runtime/procs_everything_else.odin @@ -1,8 +1,9 @@ -//+build !windows !amd64 +//+build !windows package runtime @(link_name="memset") memset :: proc "c" (ptr: rawptr, val: i32, len: int) -> rawptr { +when false { b := byte(val); p_start := uintptr(ptr); @@ -12,13 +13,15 @@ memset :: proc "c" (ptr: rawptr, val: i32, len: int) -> rawptr { } return ptr; - // when size_of(rawptr) == 8 { - // @(link_name="llvm.memset.p0i8.i64") - // llvm_memset :: proc(dst: rawptr, val: byte, len: int, align: i32, is_volatile: bool) ---; - // } else { - // @(link_name="llvm.memset.p0i8.i32") - // llvm_memset :: proc(dst: rawptr, val: byte, len: int, align: i32, is_volatile: bool) ---; - // } +} else { + when size_of(rawptr) == 8 { + @(link_name="llvm.memset.p0i8.i64") + llvm_memset :: proc(dst: rawptr, val: byte, len: int, align: i32, is_volatile: bool) ---; + } else { + @(link_name="llvm.memset.p0i8.i32") + llvm_memset :: proc(dst: rawptr, val: byte, len: int, align: i32, is_volatile: bool) ---; + } - // return llvm_memset(ptr, byte(val), len, 1, false); + return llvm_memset(ptr, byte(val), len, 1, false); +} } diff --git a/core/thread/thread_unix.odin b/core/thread/thread_unix.odin index 741e52566..9a1680043 100644 --- a/core/thread/thread_unix.odin +++ b/core/thread/thread_unix.odin @@ -65,8 +65,8 @@ create :: proc(procedure: Thread_Proc, priority := Thread_Priority.Normal) -> ^T t.procedure(t); if !t.use_init_context { - if context.temp_allocator.data == &runtime.global_scratch_allocator_data { - runtime.global_scratch_allocator_destroy(auto_cast context.temp_allocator.data); + if context.temp_allocator.data == &runtime.global_default_temp_allocator_data { + runtime.default_temp_allocator_destroy(auto_cast context.temp_allocator.data); } }