Semaphores. More...
Semaphores.
Definition in file semaphore.h.
 Include dependency graph for semaphore.h:
 Include dependency graph for semaphore.h:Go to the source code of this file.
| Macros | |
| #define | SEM_FAILED ((sem_t *) 0) | 
| Value returned if ‘sem_open’ failed. | |
| Typedefs | |
| typedef sema_t | sem_t | 
| POSIX-specific semaphore type. | |
| Functions | |
| static int | sem_init (sem_t *sem, int pshared, unsigned value) | 
| Initialize an unnamed semaphore. | |
| static int | sem_destroy (sem_t *sem) | 
| destroy an unnamed semaphore | |
| static int | sem_post (sem_t *sem) | 
| Unlock a semaphore. | |
| static int | sem_wait (sem_t *sem) | 
| Lock a semaphore. | |
| static sem_t * | sem_open (const char *name, int oflag,...) | 
| Open a named semaphore namewith open flagsoflag. | |
| static int | sem_close (sem_t *sem) | 
| Close descriptor for named semaphore sem. | |
| static int | sem_unlink (const char *name) | 
| Remove named semaphore name. | |
| int | sem_timedwait (sem_t *sem, const struct timespec *abstime) | 
| Similar to ‘sem_wait’ but wait only until abstime. | |
| static int | sem_trywait (sem_t *sem) | 
| Test whether semis posted. | |
| static int | sem_getvalue (sem_t *sem, int *sval) | 
| Get current value of semand store it insval. | |