*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> msem_remove (2)              
Title
Content
Arch
Section
 

Contents


 msem_remove(2)                                               msem_remove(2)




 NAME    [Toc]    [Back]
      msem_remove - remove a semaphore in mapped file or anonymous region

 SYNOPSIS    [Toc]    [Back]
      #include <sys/mman.h>

      int *msem_remove(msemaphore *sem);

 DESCRIPTION    [Toc]    [Back]
      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 semaphore 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 contains any value copied from a msemaphore
      structure at a different address, the result is undefined.

 RETURN VALUE    [Toc]    [Back]
      Upon success, msem_remove() returns zero; otherwise, it returns -1 and
      sets errno to indicate the error.

 ERRORS    [Toc]    [Back]
      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    [Toc]    [Back]
      msem_remove() was developed by HP and OSF.

 SEE ALSO    [Toc]    [Back]
      msem_init(2), msem_lock(2), msem_remove(2), mman(5).

 STANDARDS CONFORMANCE    [Toc]    [Back]
      msem_remove(): AES


 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
msem_init HP-UX initialize a semaphore in a mapped file or anonymous memory region
msem_init Tru64 Initialize a semaphore in a mapped file or shared memory region
msync FreeBSD synchronize a mapped region
munmap Tru64 Unmap a mapped region
msync NetBSD synchronize a mapped region
msync OpenBSD synchronize a mapped region
ftpd Tru64 The File Transfer Protocol server daemon, including anonymous service
msem_remove Tru64 Remove a semaphore
ipcrm IRIX remove a message queue, semaphore set or shared memory id
ipcrm HP-UX remove a message queue, semaphore set, or shared memory identifier
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service