mirror of
https://github.com/ziglang/zig.git
synced 2026-01-25 08:47:55 +00:00
also start prefering NtDll API. so far: * NtQueryInformationFile * NtClose adds a performance workaround for windows unicode conversion. but that should probably be removed before merging
9 lines
151 B
C
Vendored
9 lines
151 B
C
Vendored
#include <semaphore.h>
|
|
|
|
int sem_getvalue(sem_t *restrict sem, int *restrict valp)
|
|
{
|
|
int val = sem->__val[0];
|
|
*valp = val < 0 ? 0 : val;
|
|
return 0;
|
|
}
|