HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
m
msem_remove(2) msem_remove(2)
NAME
msem_remove - remove a semaphore in mapped file or anonymous region
SYNOPSIS
#include <sys/mman.h>
int *msem_remove(msemaphore *sem);
DESCRIPTION
msem_remove() removes a binary semaphore.
sem points to an msemaphore structure that specifies the semaphore to be removed. Any subsequent
use of the msemaphore structure before it is again initialized by calling msem_init() produces
undefined results.
msem_remove() also causes any process waiting in the msem_lock() function on the removed sema-
phore to return with an error.
If the msemaphore structure contains any value not resulting from a call to msem_init() followed by
a (possibly empty) sequence of calls to msem_lock()
and msem_unlock(), the results are undefined.
The address of an
msemaphore uniquely identifies the semaphore. If the
msemaphore structure con-
tains any value copied from a
msemaphore structure at a different address, the result is undefined.
RETURN VALUE
Upon success,
msem_remove() returns zero; otherwise, it returns 1 and sets
errno to indicate the
error.
ERRORS
msem_remove() fails if any of the following conditions are encountered:
[EINVAL] sem points to an msemaphore structure that has been removed.
[EFAULT] sem is an invalid pointer.
AUTHOR
msem_remove() was developed by HP and OSF.
SEE ALSO
msem_init(2), msem_lock(2), msem_remove(2), mman(5).
STANDARDS CONFORMANCE
msem_remove(): AES
HP-UX Release 11i: December 2000 1 Section 2183
___
___