11#ifndef ZOS_SEMAPHORE_H_
12#define ZOS_SEMAPHORE_H_
22#define __SIZEOF_SEM_T 32
24#define __SIZEOF_SEM_T 16
27#define SEM_FAILED ((sem_t *)0)
31 volatile unsigned int id;
43#define sem_init __sem_init
44#define sem_post __sem_post
45#define sem_trywait __sem_trywait
46#define sem_timedwait __sem_timedwait
47#define sem_wait __sem_wait
48#define sem_getvalue __sem_getvalue
49#define sem_destroy __sem_destroy
Definition zos-semaphore.h:37
____sem_t * _s
Definition zos-semaphore.h:38
Definition zos-semaphore.h:29
volatile unsigned int id
Definition zos-semaphore.h:31
pthread_mutex_t mutex
Definition zos-semaphore.h:33
pthread_cond_t cond
Definition zos-semaphore.h:34
volatile unsigned int waitcnt
Definition zos-semaphore.h:32
volatile unsigned int value
Definition zos-semaphore.h:30
#define __Z_EXPORT
Definition zos-macros.h:13
__Z_EXPORT int __sem_init(__sem_t *s0, int shared, unsigned int val)
Definition zos-semaphore.cc:59
__Z_EXPORT int __sem_getvalue(__sem_t *s0, int *sval)
Definition zos-semaphore.cc:327
__Z_EXPORT unsigned int atomic_inc(volatile unsigned int *loc)
Definition zos-semaphore.cc:55
__Z_EXPORT int __sem_timedwait(__sem_t *s0, const struct timespec *abs_timeout)
Definition zos-semaphore.cc:279
__Z_EXPORT int __sem_destroy(__sem_t *s0)
Definition zos-semaphore.cc:296
__Z_EXPORT int __sem_post(__sem_t *s0)
Definition zos-semaphore.cc:126
__Z_EXPORT int __sem_trywait(__sem_t *s0)
Definition zos-semaphore.cc:167
__Z_EXPORT int __sem_wait(__sem_t *s0)
Definition zos-semaphore.cc:290
__Z_EXPORT unsigned int atomic_dec(volatile unsigned int *loc)
Definition zos-semaphore.cc:51