mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-01 20:28:15 +00:00
replaced pthread_yield with ssched_yield, fixed semaphore post:q
This commit is contained in:
@@ -20,7 +20,10 @@ semaphore_destroy :: proc(s: ^Semaphore) {
|
||||
}
|
||||
|
||||
semaphore_post :: proc(s: ^Semaphore, count := 1) {
|
||||
assert(unix.sem_post(&s.handle) == 0);
|
||||
// NOTE: SPEED: If there's one syscall to do this, we should use it instead of the loop.
|
||||
for in 0..count-1 {
|
||||
assert(unix.sem_post(&s.handle) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
semaphore_wait_for :: proc(s: ^Semaphore) {
|
||||
|
||||
Reference in New Issue
Block a user