diff --git a/code2/host/host.odin b/code2/host/host.odin index 8434d7d..0089ff3 100644 --- a/code2/host/host.odin +++ b/code2/host/host.odin @@ -188,7 +188,7 @@ sync_client_api :: proc() write_time, result := file_last_write_time_by_name( Path_Sectr_Module ); if result == OS_ERROR_NONE && host_memory.client_api.write_time != write_time { - thread_coherent_store(& host_memory.client_api_hot_reloaded, true) + cache_coherent_store(& host_memory.client_api_hot_reloaded, true) version_id := host_memory.client_api.lib_version + 1 unload_client_api( & host_memory.client_api ) @@ -202,11 +202,11 @@ sync_client_api :: proc() } } leader = sync.barrier_wait(& host_memory.client_api_sync_lock) - if thread_coherent_load(& host_memory.client_api_hot_reloaded) + if cache_coherent_load(& host_memory.client_api_hot_reloaded) { host_memory.client_api.hot_reload(& host_memory, & thread_memory) if thread_memory.id == .Master_Prepper { - thread_coherent_store(& host_memory.client_api_hot_reloaded, false) + cache_coherent_store(& host_memory.client_api_hot_reloaded, false) } } } diff --git a/code2/host/pkg_mappings.odin b/code2/host/pkg_mappings.odin index 2827716..abdb903 100644 --- a/code2/host/pkg_mappings.odin +++ b/code2/host/pkg_mappings.odin @@ -51,9 +51,9 @@ import "core:strings" builder_to_str :: strings.to_string import "core:sync" - thread_current_id :: sync.current_thread_id - thread_coherent_load :: sync.atomic_load - thread_coherent_store :: sync.atomic_store + thread_current_id :: sync.current_thread_id + cache_coherent_load :: sync.atomic_load + cache_coherent_store :: sync.atomic_store import "core:time" Millisecond :: time.Millisecond diff --git a/code2/sectr/engine/client_api.odin b/code2/sectr/engine/client_api.odin index 6f7b972..b8b4727 100644 --- a/code2/sectr/engine/client_api.odin +++ b/code2/sectr/engine/client_api.odin @@ -42,7 +42,7 @@ hot_reload :: proc(host_mem: ^ProcessMemory, thread_mem: ^ThreadMemory) { thread_ctx = thread_mem if thread_ctx.id == .Master_Prepper { - thread_coherent_store(& memory, host_mem) + cache_coherent_store(& memory, host_mem, .Release) } } diff --git a/code2/sectr/pkg_mappings.odin b/code2/sectr/pkg_mappings.odin index ae8f82b..944d9ce 100644 --- a/code2/sectr/pkg_mappings.odin +++ b/code2/sectr/pkg_mappings.odin @@ -8,7 +8,7 @@ import "core:os" import "core:sync" AtomicMutex :: sync.Atomic_Mutex - thread_coherent_store :: sync.atomic_store + cache_coherent_store :: sync.atomic_store_explicit import "core:thread" SysThread :: thread.Thread