#include <pthread.h>
Go to the source code of this file.
|
static void | ref_init_functions (void *(*mallocf)(size_t), void *(*callocf)(size_t, size_t), void *(*reallocf)(void *, size_t), void(*freef)(void *)) |
|
static unsigned int | ref_inc (void *buf) |
|
static unsigned int | ref_dec (void *buf) |
|
static void * | ref_malloc (size_t size) |
|
static void | ref_free (void *buf) |
|
◆ ref_barrier
#define ref_barrier |
( |
|
CODE | ) |
|
Value:pthread_mutex_lock(&refc->mux); \
CODE \
pthread_mutex_unlock(&refc->mux)
Definition at line 18 of file refcount.h.
◆ ref_upcast
#define ref_upcast |
( |
|
DAT | ) |
(struct refcount_ *)((char *)(DAT - offsetof(struct refcount_, data))) |
◆ ref_dec()
static unsigned int ref_dec |
( |
void * |
buf | ) |
|
|
static |
◆ ref_free()
static void ref_free |
( |
void * |
buf | ) |
|
|
static |
◆ ref_inc()
static unsigned int ref_inc |
( |
void * |
buf | ) |
|
|
static |
◆ ref_init_functions()
static void ref_init_functions |
( |
void *(*)(size_t) |
mallocf, |
|
|
void *(*)(size_t, size_t) |
callocf, |
|
|
void *(*)(void *, size_t) |
reallocf, |
|
|
void(*)(void *) |
freef |
|
) |
| |
|
inlinestatic |
◆ ref_malloc()
static void* ref_malloc |
( |
size_t |
size | ) |
|
|
inlinestatic |
◆ REF_free
void(* REF_free) (void *) = free |
|
static |
◆ REF_malloc
void*(* REF_malloc) (size_t) = malloc |
|
static |
◆ REF_realloc
void*(* REF_realloc) (void *, size_t) = realloc |
|
static |