Naming convention change for atomics
cache_coherent_ is what I'm going with for now based off of studying it further. I really really don't like the "atomic" as the verbiage phrase. It conveys nothing about what the execution engine is actually doing with the thread caches or the bus snoop.
This commit is contained in:
1 parent
5f57cea027
commit
4abd2401f0
4 files changed
+8
-8
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user