Named POSIX Semaphores
sem_open(name, create = FALSE, overwrite = FALSE, value = 0)sem_post(sem)
sem_wait(sem)
sem_close(sem)
sem_unlink(name)
For sem_open
, an object of class "sem", which is an external
pointer to the POSIX semaphore. All other functions return NULL
invisibly and are called for their side effects.
the name of the semaphore. Consult man sem_overview
for
what makes a valid name.
should the semaphore be created if it currently does not exist?
if create == TRUE
, should we overwrite an already
existing semaphore with the name (TRUE
) or rather fail
(FALSE
).
the initial value of the semaphore (>= 0
).
an object as returned by sem_open
.
Not supported on Windows.