1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

sync/semaphores: use dispatch semaphores on MacOS (#6110)

This commit is contained in:
Uwe Krüger
2020-08-12 03:45:09 +02:00
committed by GitHub
parent ca7a64a451
commit bb93bf34ec
3 changed files with 28 additions and 66 deletions

View File

@ -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