mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
sync/semaphores: use dispatch semaphores on MacOS (#6110)
This commit is contained in:
parent
ca7a64a451
commit
bb93bf34ec
3 changed files with 28 additions and 66 deletions
|
@ -437,6 +437,13 @@ fn C.sem_trywait(voidptr) int
|
|||
fn C.sem_timedwait(voidptr, voidptr) int
|
||||
fn C.sem_destroy(voidptr) int
|
||||
|
||||
// MacOS semaphore functions
|
||||
fn C.dispatch_semaphore_create(i64) voidptr
|
||||
fn C.dispatch_semaphore_signal(voidptr) i64
|
||||
fn C.dispatch_semaphore_wait(voidptr, u64) i64
|
||||
fn C.dispatch_time(u64, i64) u64
|
||||
fn C.dispatch_release(voidptr)
|
||||
|
||||
fn C.read(fd int, buf voidptr, count size_t) int
|
||||
fn C.write(fd int, buf voidptr, count size_t) int
|
||||
fn C.close(fd int) int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue