sem_unlink(2) DG/UX 5.4 Rel. 2.01 sem_unlink(2)
NAME
sem_unlink - remove a semaphore
SYNOPSIS
#include <semaphore.h>
int semunlink (*name)
const char*name;
DESCRIPTION
Use semunlink(2) to remove a semaphore and its state information
from the system: name is the NULL-terminated string established with
the seminit(2) call.
If the semaphore indicated by name is still being referenced by a
semaphore descriptor obtained by seminit(2), its removal is
postponed until all existing semaphore descriptors are destroyed by
semdestroy(2), exit(2), or exec(2) calls.
Once this call is successful (the semaphore indicated by name is
either removed or removal is pending), it returns immediately. It
does not block pending destruction of the semaphore's descriptors.
Also, any subsequent seminit(2) or semunlink call using name will
refer to a new semaphore.
Note
* This routine is based on POSIX realtime extension document P1003.4
draft 12. It is therefore subject to change.
* Compilation of a source file using this routine requires that
feature macro _POSIX4_DRAFT_SOURCE be defined. This feature macro
is not enabled by any other feature macro, nor does it enable any
other feature macro.
* The compiled routine must be linked to library librte.a.
RETURN VALUE
If successful, semunlink returns 0. If unsuccessful, it returns -1
and sets ERRNO to:
EFAULT Unable to access name.
ENAMETOOLONG
name contains more than NAME_MAX characters.
ENOENT The semaphore does not exist.
ENOSPC Unable to allocate enough memory.
SEE ALSO
semdestroy(2), seminit(2), semlock(2), semtrylock(2),
semunlock(2).
Licensed material--property of copyright holder(s) 1