replaced pthread_yield with ssched_yield, fixed semaphore post:q

This commit is contained in:
KTRosenberg
2020-01-02 16:25:48 -05:00
parent 93ead4bcb3
commit d017b5de9d
5 changed files with 14 additions and 6 deletions
+2
View File
@@ -103,4 +103,6 @@ foreign pthread {
sem_wait :: proc(sem: ^sem_t) -> c.int ---;
sem_trywait :: proc(sem: ^sem_t) -> c.int ---;
// sem_timedwait :: proc(sem: ^sem_t, timeout: time.TimeSpec) -> c.int ---;
pthread_yield :: proc() -> c.int ---;
}
+2 -1
View File
@@ -52,7 +52,8 @@ foreign pthread {
pthread_attr_setstack :: proc(attrs: ^pthread_attr_t, stack_ptr: rawptr, stack_size: u64) -> c.int ---;
pthread_attr_getstack :: proc(attrs: ^pthread_attr_t, stack_ptr: ^rawptr, stack_size: ^u64) -> c.int ---;
pthread_yield :: proc() -> c.int ---;
sched_yield :: proc() -> c.int ---;
}
@(default_calling_convention="c")