25 RCSIDH(sem_h,
"$Id: a89712d8ca126423874ad3b0b2b6e1d4bbfd35ae $")
31 #ifndef __EMSCRIPTEN__
32 #define HAVE_SEMAPHORES
48 int fr_sem_wait(
int sem_id,
char const *
file,
bool undo_on_exit,
bool nonblock);
52 int fr_sem_get(
char const *
file,
int proj_id, uid_t uid, gid_t gid,
bool check_perm,
bool must_exist);
int fr_sem_gid(uid_t *gid, int sem_id)
Return the GID that last operated on the semaphore.
int fr_sem_cgid(gid_t *gid, int sem_id)
int fr_sem_post(int sem_id, char const *file, bool undo_on_exit)
Decrement the semaphore by 1.
int fr_sem_wait(int sem_id, char const *file, bool undo_on_exit, bool nonblock)
Wait for a semaphore to reach 0, then increment it by 1.
int fr_sem_close(int sem_id, char const *file)
Remove the semaphore, this helps with permissions issues.
int fr_sem_cuid(uid_t *uid, int sem_id)
Return the UID that created the semaphore.
int fr_sem_uid(uid_t *uid, int sem_id)
Return the UID that last operated on the semaphore.
int fr_sem_pid(pid_t *pid, int sem_id)
Return the PID of the process that last operated on the semaphore.
int fr_sem_get(char const *file, int proj_id, uid_t uid, gid_t gid, bool check_perm, bool must_exist)
Returns a semid for the semaphore associated with the file.
int fr_sem_take(int sem_id, char const *file, bool undo_on_exit)
Increment the semaphore by 1.