Data Fields | |
size_t | data_size |
ao2_destructor_fn | destructor_fn |
ast_mutex_t | lock |
uint32_t | magic |
int | ref_counter |
astobj2 objects are always prepended this data structure, which contains a lock, a reference counter, the flags and a pointer to a destructor. The refcount is used to decide when it is time to invoke the destructor. The magic number is used for consistency check. XXX the lock is not always needed, and its initialization may be expensive. Consider making it external.
Definition at line 38 of file astobj2.c.
size_t data_size |
ao2_destructor_fn destructor_fn |
Definition at line 41 of file astobj2.c.
Referenced by ao2_alloc(), and ao2_ref().
Definition at line 39 of file astobj2.c.
Referenced by __ao2_lock(), __ao2_trylock(), __ao2_unlock(), ao2_alloc(), ao2_lock(), ao2_ref(), ao2_trylock(), and ao2_unlock().
uint32_t magic |
magic number. This is used to verify that a pointer passed in is a valid astobj2
Definition at line 46 of file astobj2.c.
Referenced by ao2_alloc(), and INTERNAL_OBJ().
int ref_counter |
Definition at line 40 of file astobj2.c.
Referenced by ao2_alloc(), and ao2_ref().