The OpenNET Project / Index page

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

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

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

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

  • BSD mandoc
     

    NAME

    
    
    sem_wait
    
     
    sem_trywait
    
     - decrement (lock) a semaphore
    
     
    

    LIBRARY

    Lb libc
    
     
    

    SYNOPSIS

       #include <semaphore.h>
    int sem_wait (sem_t *sem);
    int sem_trywait (sem_t *sem);
     

    DESCRIPTION

    The sem_wait ();
    function decrements (locks) the semaphore pointed to by Fa sem , but blocks if the value of Fa sem is zero, until the value is non-zero and the value can be decremented.

    The sem_trywait ();
    function decrements (locks) the semaphore pointed to by Fa sem only if the value is non-zero. Otherwise, the semaphore is not decremented and an error is returned.  

    RETURN VALUES

    Rv -std  

    ERRORS

    The sem_wait ();
    and sem_trywait ();
    functions will fail if:

    Bq Er EINVAL
    The Fa sem argument points to an invalid semaphore.

    Additionally, sem_trywait ();
    will fail if:

    Bq Er EAGAIN
    The semaphore value was zero, and thus could not be decremented.

     

    SEE ALSO

    sem_getvalue3, sem_post3, sem(4)  

    STANDARDS

    The sem_wait ();
    and sem_trywait ();
    functions conform to St -p1003.1-96 .


     

    Index

    NAME
    LIBRARY
    SYNOPSIS
    DESCRIPTION
    RETURN VALUES
    ERRORS
    SEE ALSO
    STANDARDS


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




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

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