mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-20 21:35:19 +00:00
Merge pull request #3528 from laytan/fix-some-sync-issues
Fix some sync issues
This commit is contained in:
@@ -433,7 +433,7 @@ One_Shot_Event :: struct #no_copy {
|
||||
// Blocks the current thread until the event is made available with `one_shot_event_signal`.
|
||||
one_shot_event_wait :: proc "contextless" (e: ^One_Shot_Event) {
|
||||
for atomic_load_explicit(&e.state, .Acquire) == 0 {
|
||||
futex_wait(&e.state, 1)
|
||||
futex_wait(&e.state, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ foreign import system "system:System.framework"
|
||||
// #define OS_WAIT_ON_ADDR_AVAILABILITY \
|
||||
// __API_AVAILABLE(macos(14.4), ios(17.4), tvos(17.4), watchos(10.4))
|
||||
when ODIN_OS == .Darwin {
|
||||
when ODIN_PLATFORM_SUBTARGET == .iOS && ODIN_MINIMUM_OS_VERSION > 17_04_00 {
|
||||
when ODIN_PLATFORM_SUBTARGET == .iOS && ODIN_MINIMUM_OS_VERSION >= 17_04_00 {
|
||||
WAIT_ON_ADDRESS_AVAILABLE :: true
|
||||
} else when ODIN_MINIMUM_OS_VERSION > 14_04_00 {
|
||||
} else when ODIN_MINIMUM_OS_VERSION >= 14_04_00 {
|
||||
WAIT_ON_ADDRESS_AVAILABLE :: true
|
||||
} else {
|
||||
WAIT_ON_ADDRESS_AVAILABLE :: false
|
||||
|
||||
Reference in New Issue
Block a user