cpsema man page on IRIX

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



cpsema(D3X)							   cpsema(D3X)

NAME
     cpsema - conditionally perform a "P" or wait semaphore operation

SYNOPSIS
     #include "sys/types.h"
     #include "sys/sema.h"

     int cpsema(sema_t *semap);

   Arguments
     semap
	  Expects a pointer to the semaphore you want cpsema to conditionally
	  decrement.

DESCRIPTION
     cpsema conditionally performs a "P" operation depending on the current
     value of the semaphore. If the semaphore value is less than or equal to
     0, cpsema returns without altering the semaphore. Otherwise, cpsema
     decrements the semaphore value by 1 and returns. cpsema effectively
     performs a "P" operation if it does not cause the process to sleep;
     otherwise, it simply returns. To initialize semaphores before using them,
     call initnsema(D3X) or initnsema_mutex(D3X).

   Return Values
     cpsema returns 0 if the semaphore value is less than or equal to 0. (If
     cpsema returns 0, psema(D3X) would have slept.) Otherwise cpsema returns
     1.

   See Also
     initnsema(D3X), initnsema_mutex(D3X), psema(D3X), SLEEP_TRYLOCK(D3)

									Page 1

[top]

List of man pages available for IRIX

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