Functions | |
apr_status_t | apr_atomic_init (apr_pool_t *p) |
apr_uint32_t | apr_atomic_read (volatile apr_atomic_t *mem) |
void | apr_atomic_set (volatile apr_atomic_t *mem, apr_uint32_t val) |
void | apr_atomic_add (volatile apr_atomic_t *mem, apr_uint32_t val) |
void | apr_atomic_inc (volatile apr_atomic_t *mem) |
int | apr_atomic_dec (volatile apr_atomic_t *mem) |
apr_uint32_t | apr_atomic_cas (volatile apr_uint32_t *mem, long with, long cmp) |
void * | apr_atomic_casptr (volatile void **mem, void *with, const void *cmp) |
Variables | |
typedef | apr_atomic_t |
void apr_atomic_add | ( | volatile apr_atomic_t * | mem, | |
apr_uint32_t | val | |||
) |
Add 'val' to the atomic variable
mem | pointer to the atomic value | |
val | the addition |
apr_uint32_t apr_atomic_cas | ( | volatile apr_uint32_t * | mem, | |
long | with, | |||
long | cmp | |||
) |
compare the atomic's value with cmp. If they are the same swap the value with 'with'
mem | pointer to the atomic value | |
with | what to swap it with | |
cmp | the value to compare it to |
void* apr_atomic_casptr | ( | volatile void ** | mem, | |
void * | with, | |||
const void * | cmp | |||
) |
compare the pointer's value with cmp. If they are the same swap the value with 'with'
mem | pointer to the pointer | |
with | what to swap it with | |
cmp | the value to compare it to |
int apr_atomic_dec | ( | volatile apr_atomic_t * | mem | ) |
decrement the atomic variable by 1
mem | pointer to the atomic value |
void apr_atomic_inc | ( | volatile apr_atomic_t * | mem | ) |
increment the atomic variable by 1
mem | pointer to the atomic value |
apr_status_t apr_atomic_init | ( | apr_pool_t * | p | ) |
this function is required on some platforms to initialize the atomic operation's internal structures
p | pool |
apr_uint32_t apr_atomic_read | ( | volatile apr_atomic_t * | mem | ) |
read the value stored in a atomic variable
mem | the pointer |
void apr_atomic_set | ( | volatile apr_atomic_t * | mem, | |
apr_uint32_t | val | |||
) |
set the value for atomic.
mem | the pointer | |
val | the value |
typedef apr_atomic_t |
structure for holding a atomic value. this number >only< has a 24 bit size on some platforms