sem_destroy man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

SEM_DESTROY(3C)						       SEM_DESTROY(3C)

NAME
       sem_destroy - destroy an unnamed semaphore

SYNOPSIS
       #include <semaphore.h>

       int sem_destroy(sem_t *sem);

DESCRIPTION
       The  sem_destroy()  function  is	 used to destroy the unnamed semaphore
       indicated by sem. Only a semaphore that was created using  sem_init(3C)
       may   be	  destroyed   using   sem_destroy();  the  effect  of  calling
       sem_destroy() with a named semaphore is undefined. The effect of subse‐
       quent use of the semaphore sem is undefined until sem is re-initialized
       by another call to sem_init(3C).

       It is safe to destroy an initialised semaphore upon  which  no  threads
       are  currently blocked. The effect of destroying a semaphore upon which
       other threads  are currently blocked is undefined.

RETURN VALUES
       If successful, sem_destroy() returns 0, otherwise  it  returns  −1  and
       sets errno to indicate the error.

ERRORS
       The  sem_destroy() function will fail if:

       EINVAL
		  The sem argument is not a valid semaphore.

       The sem_destroy() function may fail if:

       EBUSY
		 There are currently processes (or LWPs or threads) blocked on
		 the semaphore.

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌────────────────────┬───────────────────┐
       │ATTRIBUTE TYPE	    │ ATTRIBUTE VALUE	│
       ├────────────────────┼───────────────────┤
       │Interface Stability │ Committed		│
       ├────────────────────┼───────────────────┤
       │MT-Level	    │ MT-Safe		│
       ├────────────────────┼───────────────────┤
       │Standard	    │ See standards(5). │
       └────────────────────┴───────────────────┘

SEE ALSO
       sem_init(3C), sem_open(3C), attributes(5), standards(5)

				  Feb 5, 2008		       SEM_DESTROY(3C)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net