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

  man pages->Tru64 Unix man pages -> sem_unlink (3)              
Title
Content
Arch
Section
 

sem_unlink(3)

Contents


NAME    [Toc]    [Back]

       sem_unlink   -   Removes  the  specified  named  semaphore
       (P1003.1b)

SYNOPSIS    [Toc]    [Back]

       #include <semaphore.h>

       int sem_unlink ( const char *name) ;


LIBRARY    [Toc]    [Back]

       Realtime Library (librt.so, librt.a)

PARAMETERS    [Toc]    [Back]

       Specifies the name of the semaphore to remove.

DESCRIPTION    [Toc]    [Back]

       The sem_unlink function removes a semaphore named  by  the
       string  name. If the semaphore is referenced by other processes,
 sem_unlink  does  not  change  the  state  of  the
       semaphore.

       If other processes have the semaphore open when sem_unlink
       is called, the semaphore is not destroyed until all references
  to  the  semaphore  have been destroyed by calls to
       sem_close.  The sem_unlink function  returns  immediately;
       it does not wait until all references have been destroyed.

       Calls  to  sem_open  to  recreate  or  reconnect  to   the
       semaphore  refer  to  a  new semaphore after sem_unlink is
       called.

RETURN VALUES    [Toc]    [Back]

       On a successful call, a value of  0  (zero)  is  returned.
       Otherwise,  a  value of -1 is returned and errno is set to
       indicate that an error occurred.

ERRORS    [Toc]    [Back]

       The sem_unlink function fails under the  following  conditions:
 Permission is denied to unlink the named semaphore.
       The length of the name  string  exceeds  {NAME_MAX}  while
       {_POSIX_NO_TRUNC}  is in effect.  The named semaphore does
       not exist.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: sem_close(3), sem_open(3)

       Guide to Realtime Programming



                                                    sem_unlink(3)
[ Back ]
 Similar pages
Name OS Title
sem_close Tru64 Deallocates the specified named semaphore (P1003.1b)
sem_open Tru64 Opens/creates a named semaphore for use by a process (P1003.1b)
sem_getvalue Tru64 Gets the value of a specified semaphore (P1003.1b)
mq_unlink Tru64 Removes a message queue (P1003.1b)
sem_post Tru64 Unlocks a semaphore (P1003.1b)
sem_init Tru64 Initializes an unnamed semaphore (P1003.1b)
sem_destroy Tru64 Destroys an unnamed semaphore (P1003.1b)
shm_unlink Tru64 Removes a shared memory object created by a call to the shm_open function (P1003.1b)
sem_close FreeBSD named semaphore operations
sem_open FreeBSD named semaphore operations
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service