diff options
| author | Andreas T Jonsson <mail@andreasjonsson.se> | 2024-04-18 16:20:49 +0200 |
|---|---|---|
| committer | Andreas T Jonsson <mail@andreasjonsson.se> | 2024-04-18 16:20:49 +0200 |
| commit | 41d4dfbcd5d0d977ac01170fcc236a099af34f90 (patch) | |
| tree | 4706084c179c6cbc23b0f2e8ba44065aee3afb74 | |
| parent | 38640d5d9e223c30889e33855c5fd953cc8ce37f (diff) | |
Fixed concurrency issue
Fixed broken thread policy causing deadlocks.
| -rw-r--r-- | core/thread/thread_unix.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/thread/thread_unix.odin b/core/thread/thread_unix.odin index c80d6854b..e25d3541c 100644 --- a/core/thread/thread_unix.odin +++ b/core/thread/thread_unix.odin @@ -78,7 +78,7 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread { // NOTE(tetra, 2019-11-01): These only fail if their argument is invalid. assert(unix.pthread_attr_setdetachstate(&attrs, unix.PTHREAD_CREATE_JOINABLE) == 0) - when ODIN_OS != .Haiku { + when ODIN_OS != .Haiku && ODIN_OS != .NetBSD { assert(unix.pthread_attr_setinheritsched(&attrs, unix.PTHREAD_EXPLICIT_SCHED) == 0) } @@ -91,7 +91,7 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread { // Set thread priority. policy: i32 res: i32 - when ODIN_OS != .Haiku { + when ODIN_OS != .Haiku && ODIN_OS != .NetBSD { res = unix.pthread_attr_getschedpolicy(&attrs, &policy) assert(res == 0) } |