Wed Oct 28 11:53:25 2009

Asterisk developer's documentation


__priv_data Struct Reference


Data Fields

size_t data_size
ao2_destructor_fn destructor_fn
ast_mutex_t lock
uint32_t magic
int ref_counter

Detailed Description

astobj2 objects are always preceded by 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 40 of file astobj2.c.


Field Documentation

size_t data_size

for stats

Definition at line 45 of file astobj2.c.

Referenced by __ao2_alloc(), and __ao2_ref().

Definition at line 43 of file astobj2.c.

Referenced by __ao2_alloc(), __ao2_ref(), and _ao2_ref_debug().

uint32_t magic

magic number. This is used to verify that a pointer passed in is a valid astobj2

Definition at line 48 of file astobj2.c.

Referenced by __ao2_alloc(), and INTERNAL_OBJ().

Definition at line 42 of file astobj2.c.

Referenced by __ao2_alloc(), __ao2_ref(), and _ao2_ref_debug().


The documentation for this struct was generated from the following file:

Generated on Wed Oct 28 11:53:25 2009 for Asterisk - the Open Source PBX by  doxygen 1.5.6