123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- #ifndef _SEMAPHORE_H
- #define _SEMAPHORE_H 1
- #include <features.h>
- #include <sys/types.h>
- #ifdef __USE_XOPEN2K
- # define __need_timespec
- # include <time.h>
- #endif
- #include <bits/semaphore.h>
- __BEGIN_DECLS
- extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value)
- __THROW;
- extern int sem_destroy (sem_t *__sem) __THROW;
- extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW;
- extern int sem_close (sem_t *__sem) __THROW;
- extern int sem_unlink (const char *__name) __THROW;
- extern int sem_wait (sem_t *__sem);
- #ifdef __USE_XOPEN2K
- extern int sem_timedwait (sem_t *__restrict __sem,
- const struct timespec *__restrict __abstime);
- #endif
- extern int sem_trywait (sem_t *__sem) __THROWNL;
- extern int sem_post (sem_t *__sem) __THROWNL;
- extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)
- __THROW;
- __END_DECLS
- #endif
|