Change to use ODIN_VALGRIND_SUPPORT

This commit is contained in:
gingerBill
2023-01-23 09:29:39 +00:00
parent 117c0cceb1
commit f438153b81
2 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -110,7 +110,7 @@ Barrier :: struct {
}
barrier_init :: proc "contextless" (b: ^Barrier, thread_count: int) {
when ODIN_ARCH == .amd64 {
when ODIN_VALGRIND_SUPPORT {
vg.helgrind_barrier_resize_pre(b, uint(thread_count))
}
b.index = 0
@@ -121,7 +121,7 @@ barrier_init :: proc "contextless" (b: ^Barrier, thread_count: int) {
// Block the current thread until all threads have rendezvoused
// Barrier can be reused after all threads rendezvoused once, and can be used continuously
barrier_wait :: proc "contextless" (b: ^Barrier) -> (is_leader: bool) {
when ODIN_ARCH == .amd64 {
when ODIN_VALGRIND_SUPPORT {
vg.helgrind_barrier_wait_pre(b)
}
guard(&b.mutex)