Something went wrong. Try again.
Cider Isn't Darwin Emulation, Really
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132#include "sem_wait.h"#include "../base.h"#include "../errno.h"#include <sys/errno.h>#include <linux-syscalls/linux.h>#include <elfcalls.h>#include "../bsdthread/cancelable.h"
extern struct elf_calls* elfcalls(void);
long sys_sem_wait(int* sem){ CANCELATION_POINT(); return sys_sem_wait_nocancel(sem);}
long sys_sem_wait_nocancel(int* sem){#ifndef VARIANT_DYLD int ret;
ret = elfcalls()->sem_wait(sem); if (ret == -1) ret = -errno_linux_to_bsd(elfcalls()->get_errno());
return ret;#else return -ENOSYS;#endif}