mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
sync: add semaphores (#5831)
This commit is contained in:
@ -390,6 +390,9 @@ fn C.ReleaseMutex(voidptr) bool
|
||||
fn C.CreateEvent(int, bool, bool, byteptr) voidptr
|
||||
fn C.SetEvent(voidptr) int
|
||||
|
||||
fn C.CreateSemaphore(voidptr, int, int, voidptr) voidptr
|
||||
fn C.ReleaseSemaphore(voidptr, int, voidptr) voidptr
|
||||
|
||||
fn C.InitializeSRWLock(voidptr)
|
||||
fn C.AcquireSRWLockShared(voidptr)
|
||||
fn C.AcquireSRWLockExclusive(voidptr)
|
||||
@ -409,6 +412,19 @@ fn C.pthread_rwlock_rdlock(voidptr) int
|
||||
fn C.pthread_rwlock_wrlock(voidptr) int
|
||||
fn C.pthread_rwlock_unlock(voidptr) int
|
||||
|
||||
fn C.pthread_condattr_init(voidptr) int
|
||||
fn C.pthread_condattr_setpshared(voidptr, int) int
|
||||
fn C.pthread_cond_init(voidptr, voidptr) int
|
||||
fn C.pthread_cond_signal(voidptr) int
|
||||
fn C.pthread_cond_wait(voidptr, voidptr) int
|
||||
fn C.pthread_cond_timedwait(voidptr, voidptr, voidptr) int
|
||||
|
||||
fn C.sem_init(voidptr, int, u32) int
|
||||
fn C.sem_post(voidptr) int
|
||||
fn C.sem_wait(voidptr) int
|
||||
fn C.sem_trywait(voidptr) int
|
||||
fn C.sem_timedwait(voidptr, voidptr) int
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user