zoslib
z/OS C/C++ Library
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
zos-semaphore.h File Reference
#include "zos-macros.h"
#include <errno.h>
#include <inttypes.h>
#include <pthread.h>
#include <sys/sem.h>

Go to the source code of this file.

Classes

struct  __sem
 
struct  __sem_t
 

Macros

#define __SIZEOF_SEM_T   16
 
#define SEM_FAILED   ((sem_t *)0)
 
#define sem_t   __sem_t
 
#define sem_init   __sem_init
 
#define sem_post   __sem_post
 
#define sem_trywait   __sem_trywait
 
#define sem_timedwait   __sem_timedwait
 
#define sem_wait   __sem_wait
 
#define sem_getvalue   __sem_getvalue
 
#define sem_destroy   __sem_destroy
 

Typedefs

typedef struct __sem ____sem_t
 

Functions

__Z_EXPORT int __sem_init (__sem_t *s0, int shared, unsigned int val)
 
__Z_EXPORT int __sem_post (__sem_t *s0)
 
__Z_EXPORT int __sem_trywait (__sem_t *s0)
 
__Z_EXPORT int __sem_timedwait (__sem_t *s0, const struct timespec *abs_timeout)
 
__Z_EXPORT int __sem_wait (__sem_t *s0)
 
__Z_EXPORT int __sem_getvalue (__sem_t *s0, int *sval)
 
__Z_EXPORT int __sem_destroy (__sem_t *s0)
 
__Z_EXPORT unsigned int atomic_dec (volatile unsigned int *loc)
 
__Z_EXPORT unsigned int atomic_inc (volatile unsigned int *loc)
 

Macro Definition Documentation

◆ __SIZEOF_SEM_T

#define __SIZEOF_SEM_T   16

◆ sem_destroy

#define sem_destroy   __sem_destroy

◆ SEM_FAILED

#define SEM_FAILED   ((sem_t *)0)

◆ sem_getvalue

#define sem_getvalue   __sem_getvalue

◆ sem_init

#define sem_init   __sem_init

◆ sem_post

#define sem_post   __sem_post

◆ sem_t

#define sem_t   __sem_t

◆ sem_timedwait

#define sem_timedwait   __sem_timedwait

◆ sem_trywait

#define sem_trywait   __sem_trywait

◆ sem_wait

#define sem_wait   __sem_wait

Typedef Documentation

◆ ____sem_t

typedef struct __sem ____sem_t

Function Documentation

◆ __sem_destroy()

__Z_EXPORT int __sem_destroy ( __sem_t s0)

◆ __sem_getvalue()

__Z_EXPORT int __sem_getvalue ( __sem_t s0,
int *  sval 
)

◆ __sem_init()

__Z_EXPORT int __sem_init ( __sem_t s0,
int  shared,
unsigned int  val 
)

TODO(itodorov) - zos: document these interfaces

◆ __sem_post()

__Z_EXPORT int __sem_post ( __sem_t s0)

◆ __sem_timedwait()

__Z_EXPORT int __sem_timedwait ( __sem_t s0,
const struct timespec *  abs_timeout 
)

◆ __sem_trywait()

__Z_EXPORT int __sem_trywait ( __sem_t s0)

◆ __sem_wait()

__Z_EXPORT int __sem_wait ( __sem_t s0)

◆ atomic_dec()

__Z_EXPORT unsigned int atomic_dec ( volatile unsigned int *  loc)

◆ atomic_inc()

__Z_EXPORT unsigned int atomic_inc ( volatile unsigned int *  loc)