The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

sem_destroy (3)
  • >> sem_destroy (3) ( Solaris man: Библиотечные вызовы )
  • sem_destroy (3) ( FreeBSD man: Библиотечные вызовы )
  • sem_destroy (3) ( Linux man: Библиотечные вызовы )
  • sem_destroy (3) ( POSIX man: Библиотечные вызовы )
  •  

    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 subsequent 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 TYPEATTRIBUTE VALUE

    Interface StabilityCommitted

    MT-Level

    Standard

     

    SEE ALSO

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


     

    Index

    NAME
    SYNOPSIS
    DESCRIPTION
    RETURN VALUES
    ERRORS
    ATTRIBUTES
    SEE ALSO


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру