mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-31 20:00:09 +00:00
Default to pthreads in sync2 for *nix
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
package thread
|
||||
|
||||
import "core:runtime"
|
||||
import "core:sync"
|
||||
import sync "core:sync/sync2"
|
||||
import win32 "core:sys/windows"
|
||||
|
||||
Thread_Os_Specific :: struct {
|
||||
@@ -38,7 +38,7 @@ _create :: proc(procedure: Thread_Proc, priority := Thread_Priority.Normal) -> ^
|
||||
}
|
||||
}
|
||||
|
||||
sync.atomic_store(&t.done, true, .Sequentially_Consistent);
|
||||
sync.atomic_store(&t.done, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ _is_done :: proc(using thread: ^Thread) -> bool {
|
||||
// NOTE(tetra, 2019-10-31): Apparently using wait_for_single_object and
|
||||
// checking if it didn't time out immediately, is not good enough,
|
||||
// so we do it this way instead.
|
||||
return sync.atomic_load(&done, .Sequentially_Consistent);
|
||||
return sync.atomic_load(&done);
|
||||
}
|
||||
|
||||
_join :: proc(using thread: ^Thread) {
|
||||
|
||||
Reference in New Issue
Block a user