#include "macros.h"
Go to the source code of this file.
Data Structures | |
struct | mc_rwlock_s |
Typedefs | |
typedef struct mc_rwlock_s | mc_rwlock_t |
typedef mc_rwlock_t * | mc_rwlock_p |
Functions | |
int | mc_rwlock_init (mc_rwlock_p rwlock) |
int | mc_rwlock_destroy (mc_rwlock_p rwlock) |
int | mc_rwlock_rdlock (mc_rwlock_p rwlock) |
int | mc_rwlock_rdunlock (mc_rwlock_p rwlock) |
int | mc_rwlock_wrlock (mc_rwlock_p rwlock) |
int | mc_rwlock_wrunlock (mc_rwlock_p rwlock) |
typedef mc_rwlock_t* mc_rwlock_p |
Definition at line 46 of file mc_rwlock.h.
typedef struct mc_rwlock_s mc_rwlock_t |
int mc_rwlock_destroy | ( | mc_rwlock_p | rwlock | ) |
Definition at line 66 of file mc_rwlock.c.
References mc_rwlock_s::cond, COND_DESTROY, mc_rwlock_s::lock, and MUTEX_DESTROY.
int mc_rwlock_init | ( | mc_rwlock_p | rwlock | ) |
Definition at line 46 of file mc_rwlock.c.
References CHECK_NULL, mc_rwlock_s::cond, COND_INIT, COND_T, mc_rwlock_s::lock, MC_ERR_MEMORY, MUTEX_INIT, MUTEX_T, mc_rwlock_s::num_readers, mc_rwlock_s::write_flag, and mc_rwlock_s::write_request.
int mc_rwlock_rdlock | ( | mc_rwlock_p | rwlock | ) |
Definition at line 79 of file mc_rwlock.c.
References mc_rwlock_s::cond, COND_WAIT, mc_rwlock_s::lock, MUTEX_LOCK, MUTEX_UNLOCK, mc_rwlock_s::num_readers, mc_rwlock_s::write_flag, and mc_rwlock_s::write_request.
int mc_rwlock_rdunlock | ( | mc_rwlock_p | rwlock | ) |
Definition at line 94 of file mc_rwlock.c.
References mc_rwlock_s::cond, COND_SIGNAL, mc_rwlock_s::lock, MUTEX_LOCK, MUTEX_UNLOCK, and mc_rwlock_s::num_readers.
int mc_rwlock_wrlock | ( | mc_rwlock_p | rwlock | ) |
Definition at line 107 of file mc_rwlock.c.
References mc_rwlock_s::cond, COND_WAIT, mc_rwlock_s::lock, MUTEX_LOCK, MUTEX_UNLOCK, mc_rwlock_s::num_readers, mc_rwlock_s::write_flag, and mc_rwlock_s::write_request.
int mc_rwlock_wrunlock | ( | mc_rwlock_p | rwlock | ) |
Definition at line 126 of file mc_rwlock.c.
References mc_rwlock_s::cond, COND_SIGNAL, mc_rwlock_s::lock, MUTEX_LOCK, MUTEX_UNLOCK, and mc_rwlock_s::write_flag.