Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Functions implementing astobj2 objects. More...
#include "asterisk.h"
#include "asterisk/_private.h"
#include "asterisk/astobj2.h"
#include "astobj2_private.h"
#include "astobj2_container_private.h"
#include "asterisk/cli.h"
#include "asterisk/paths.h"
Go to the source code of this file.
Data Structures | |
struct | __priv_data |
struct | ao2_lock_priv |
struct | ao2_lockobj_priv |
struct | ao2_rwlock_priv |
struct | ao2_weakproxy_notification |
struct | astobj2 |
struct | astobj2_lock |
struct | astobj2_lockobj |
struct | astobj2_rwlock |
Macros | |
#define | __INTERNAL_OBJ_CHECK(user_data, file, line, func) |
convert from a pointer _p to a user-defined object More... | |
#define | AO2_MAGIC 0xa70b123 |
#define | AO2_WEAK 0xa70b122 |
#define | ast_log ast_log_safe |
#define | DEBUG_THREADS_LOOSE_ABI |
#define | EXCESSIVE_REF_COUNT 100000 |
#define | EXTERNAL_OBJ(_p) ((_p) == NULL ? NULL : (_p)->user_data) |
convert from a pointer _p to an astobj2 object More... | |
#define | INTERNAL_OBJ(user_data) (struct astobj2 *) ((char *) user_data - sizeof(struct astobj2)) |
#define | INTERNAL_OBJ_CHECK(user_data) __INTERNAL_OBJ_CHECK(user_data, __FILE__, __LINE__, __PRETTY_FUNCTION__) |
#define | INTERNAL_OBJ_LOCKOBJ(user_data) ((struct astobj2_lockobj *) (((char *) (user_data)) - sizeof(struct astobj2_lockobj))) |
#define | INTERNAL_OBJ_MUTEX(user_data) ((struct astobj2_lock *) (((char *) (user_data)) - sizeof(struct astobj2_lock))) |
#define | INTERNAL_OBJ_RWLOCK(user_data) ((struct astobj2_rwlock *) (((char *) (user_data)) - sizeof(struct astobj2_rwlock))) |
#define | IS_AO2_MAGIC_BAD(p) (AO2_MAGIC != (p->priv_data.magic | 1)) |
Functions | |
enum ao2_lock_req | __adjust_lock (void *user_data, enum ao2_lock_req lock_how, int keep_stronger) |
void * | __ao2_alloc (size_t data_size, ao2_destructor_fn destructor_fn, unsigned int options, const char *tag, const char *file, int line, const char *func) |
void * | __ao2_alloc_with_lockobj (size_t data_size, ao2_destructor_fn destructor_fn, void *lockobj, const char *tag, const char *file, int line, const char *func) |
void | __ao2_cleanup (void *obj) |
void | __ao2_cleanup_debug (void *obj, const char *tag, const char *file, int line, const char *function) |
void * | __ao2_get_weakproxy (void *obj, const char *tag, const char *file, int line, const char *func) |
int | __ao2_lock (void *user_data, enum ao2_lock_req lock_how, const char *file, const char *func, int line, const char *var) |
Lock an object. More... | |
int | __ao2_ref (void *user_data, int delta, const char *tag, const char *file, int line, const char *func) |
int | __ao2_trylock (void *user_data, enum ao2_lock_req lock_how, const char *file, const char *func, int line, const char *var) |
Try locking– (don't block if fail) More... | |
int | __ao2_unlock (void *user_data, const char *file, const char *func, int line, const char *var) |
Unlock an object. More... | |
void * | __ao2_weakproxy_alloc (size_t data_size, ao2_destructor_fn destructor_fn, const char *tag, const char *file, int line, const char *func) |
void * | __ao2_weakproxy_get_object (void *weakproxy, int flags, const char *tag, const char *file, int line, const char *func) |
int | __ao2_weakproxy_ref_object (void *weakproxy, int delta, int flags, const char *tag, const char *file, int line, const char *func) |
int | __ao2_weakproxy_set_object (void *weakproxy, void *obj, int flags, const char *tag, const char *file, int line, const char *func) |
void * | ao2_object_get_lockaddr (void *user_data) |
Return the mutex lock address of an object. More... | |
unsigned int | ao2_options_get (void *obj) |
Retrieve the ao2 options used to create the object. More... | |
int | ao2_weakproxy_subscribe (void *weakproxy, ao2_weakproxy_notification_cb cb, void *data, int flags) |
Request notification when weakproxy points to NULL. More... | |
int | ao2_weakproxy_unsubscribe (void *weakproxy, ao2_weakproxy_notification_cb destroyed_cb, void *data, int flags) |
Remove notification of real object destruction. More... | |
static void | astobj2_cleanup (void) |
int | astobj2_init (void) |
static void * | internal_ao2_alloc (size_t data_size, ao2_destructor_fn destructor_fn, unsigned int options, void *lockobj, const char *tag, const char *file, int line, const char *func) |
int | internal_is_ao2_object (void *user_data) |
void | log_bad_ao2 (void *user_data, const char *file, int line, const char *func) |
Variables | |
static FILE * | ref_log |
#define __INTERNAL_OBJ_CHECK | ( | user_data, | |
file, | |||
line, | |||
func | |||
) |
#define ast_log ast_log_safe |
#define EXCESSIVE_REF_COUNT 100000 |
#define INTERNAL_OBJ_CHECK | ( | user_data | ) | __INTERNAL_OBJ_CHECK(user_data, __FILE__, __LINE__, __PRETTY_FUNCTION__) |
#define INTERNAL_OBJ_LOCKOBJ | ( | user_data | ) | ((struct astobj2_lockobj *) (((char *) (user_data)) - sizeof(struct astobj2_lockobj))) |
#define INTERNAL_OBJ_MUTEX | ( | user_data | ) | ((struct astobj2_lock *) (((char *) (user_data)) - sizeof(struct astobj2_lock))) |
#define INTERNAL_OBJ_RWLOCK | ( | user_data | ) | ((struct astobj2_rwlock *) (((char *) (user_data)) - sizeof(struct astobj2_rwlock))) |
#define IS_AO2_MAGIC_BAD | ( | p | ) | (AO2_MAGIC != (p->priv_data.magic | 1)) |
enum ao2_lock_req __adjust_lock | ( | void * | user_data, |
enum ao2_lock_req | lock_how, | ||
int | keep_stronger | ||
) |
Definition at line 425 of file astobj2.c.
References __adjust_lock(), AO2_ALLOC_OPT_LOCK_MASK, AO2_ALLOC_OPT_LOCK_MUTEX, AO2_ALLOC_OPT_LOCK_NOLOCK, AO2_ALLOC_OPT_LOCK_OBJ, AO2_ALLOC_OPT_LOCK_RWLOCK, AO2_LOCK_REQ_MUTEX, AO2_LOCK_REQ_RDLOCK, AO2_LOCK_REQ_WRLOCK, ao2_rdlock, ao2_unlock, ao2_wrlock, ast_log, INTERNAL_OBJ, INTERNAL_OBJ_LOCKOBJ, INTERNAL_OBJ_RWLOCK, ao2_lockobj_priv::lock, astobj2_lockobj::lockobj, LOG_ERROR, ao2_rwlock_priv::num_lockers, __priv_data::options, astobj2::priv_data, astobj2_rwlock::rwlock, astobj2::user_data, and astobj2_lockobj::user_data.
Referenced by __adjust_lock(), __ao2_iterator_next(), __ao2_link(), __ao2_weakproxy_find(), ao2_iterator_restart(), hash_ao2_node_destructor(), internal_ao2_traverse(), and rb_ao2_node_destructor().
void * __ao2_alloc | ( | size_t | data_size, |
ao2_destructor_fn | destructor_fn, | ||
unsigned int | options, | ||
const char * | tag, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
Definition at line 768 of file astobj2.c.
References make_ari_stubs::file, internal_ao2_alloc(), NULL, and options.
Referenced by __ao2_container_alloc_hash(), __ao2_container_alloc_rbtree(), __ao2_weakproxy_alloc(), __ast_channel_internal_alloc_with_initializers(), __ast_format_cap_alloc(), __ast_named_lock_get(), __ast_sorcery_open(), _moh_class_malloc(), and state_alloc().
void * __ao2_alloc_with_lockobj | ( | size_t | data_size, |
ao2_destructor_fn | destructor_fn, | ||
void * | lockobj, | ||
const char * | tag, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
Definition at line 774 of file astobj2.c.
References AO2_ALLOC_OPT_LOCK_OBJ, make_ari_stubs::file, and internal_ao2_alloc().
void __ao2_cleanup | ( | void * | obj | ) |
gcc attribute(cleanup()) functions
Definition at line 677 of file astobj2.c.
References ao2_ref.
Referenced by agent_request_exec(), ast_ari_bridges_set_video_source(), bridge_agent_hold_push(), bridge_builtin_set_limits(), bridge_stasis_queue_join_action(), dial_bridge_after_cb(), internal_bridge_after_cb(), native_rtp_bridge_framehook_attach(), parking_set_duration(), and speech_observer_loaded().
void __ao2_cleanup_debug | ( | void * | obj, |
const char * | tag, | ||
const char * | file, | ||
int | line, | ||
const char * | function | ||
) |
Definition at line 670 of file astobj2.c.
References __ao2_ref(), and make_ari_stubs::file.
void * __ao2_get_weakproxy | ( | void * | obj, |
const char * | tag, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
Definition at line 917 of file astobj2.c.
References __ao2_ref(), __INTERNAL_OBJ_CHECK, AO2_MAGIC, make_ari_stubs::file, __priv_data::magic, NULL, astobj2::priv_data, and __priv_data::weakptr.
int __ao2_lock | ( | void * | a, |
enum ao2_lock_req | lock_how, | ||
const char * | file, | ||
const char * | func, | ||
int | line, | ||
const char * | var | ||
) |
Lock an object.
a | A pointer to the object we want to lock. |
lock_how,file,func,line,var |
Definition at line 222 of file astobj2.c.
References __ao2_lock(), __ast_pthread_mutex_lock(), __ast_rwlock_rdlock(), __ast_rwlock_wrlock(), __INTERNAL_OBJ_CHECK, __LOG_ERROR, AO2_ALLOC_OPT_LOCK_MASK, AO2_ALLOC_OPT_LOCK_MUTEX, AO2_ALLOC_OPT_LOCK_NOLOCK, AO2_ALLOC_OPT_LOCK_OBJ, AO2_ALLOC_OPT_LOCK_RWLOCK, AO2_LOCK_REQ_MUTEX, AO2_LOCK_REQ_RDLOCK, AO2_LOCK_REQ_WRLOCK, ast_atomic_fetchadd_int(), ast_log, make_ari_stubs::file, INTERNAL_OBJ_LOCKOBJ, INTERNAL_OBJ_MUTEX, INTERNAL_OBJ_RWLOCK, ao2_lock_priv::lock, ao2_rwlock_priv::lock, ao2_lockobj_priv::lock, astobj2_lockobj::lockobj, __priv_data::lockused, astobj2_lock::mutex, NULL, ao2_rwlock_priv::num_lockers, __priv_data::options, astobj2::priv_data, ref_log, astobj2_rwlock::rwlock, astobj2::user_data, astobj2_lockobj::user_data, and var.
Referenced by __ao2_lock(), _agent_lock(), _ast_bridge_channel_lock(), and _ast_bridge_lock().
int __ao2_ref | ( | void * | user_data, |
int | delta, | ||
const char * | tag, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
Definition at line 498 of file astobj2.c.
References __ast_assert_failed(), __INTERNAL_OBJ_CHECK, __LOG_ERROR, AO2_ALLOC_OPT_LOCK_MASK, AO2_ALLOC_OPT_LOCK_MUTEX, AO2_ALLOC_OPT_LOCK_NOLOCK, AO2_ALLOC_OPT_LOCK_OBJ, AO2_ALLOC_OPT_LOCK_RWLOCK, AO2_ALLOC_OPT_NO_REF_DEBUG, ao2_lock, AO2_MAGIC, ao2_ref, ao2_t_ref, ao2_unlock, ast_assert, ast_atomic_fetch_add, ast_atomic_fetchadd_int(), ast_free, ast_get_tid(), AST_LIST_HEAD_INIT_NOLOCK, AST_LIST_REMOVE_HEAD, ast_log, ast_mutex_destroy, ast_rwlock_destroy, ao2_weakproxy_notification::cb, ao2_weakproxy_notification::data, ao2_weakproxy::destroyed_cb, __priv_data::destructor_fn, EXCESSIVE_REF_COUNT, make_ari_stubs::file, INTERNAL_OBJ_CHECK, INTERNAL_OBJ_LOCKOBJ, INTERNAL_OBJ_MUTEX, INTERNAL_OBJ_RWLOCK, ao2_weakproxy_notification::list, ao2_lock_priv::lock, ao2_rwlock_priv::lock, ao2_lockobj_priv::lock, astobj2_lockobj::lockobj, __priv_data::lockused, __priv_data::magic, astobj2_lock::mutex, NULL, __priv_data::options, astobj2::priv_data, __priv_data::ref_counter, ref_log, astobj2_rwlock::rwlock, astobj2::user_data, and __priv_data::weakptr.
Referenced by __ao2_cleanup_debug(), __ao2_container_clone(), __ao2_get_weakproxy(), __ao2_global_obj_ref(), __ao2_global_obj_replace(), __ao2_global_obj_replace_unref(), __ao2_iterator_next(), __ao2_weakproxy_get_object(), __ao2_weakproxy_ref_object(), __ao2_weakproxy_set_object(), __ast_format_cap_append(), __ast_module_ref(), __ast_module_unref(), __container_unlink_node_debug(), hash_ao2_new_node(), internal_ao2_traverse(), and rb_ao2_new_node().
int __ao2_trylock | ( | void * | a, |
enum ao2_lock_req | lock_how, | ||
const char * | file, | ||
const char * | func, | ||
int | line, | ||
const char * | var | ||
) |
Try locking– (don't block if fail)
a | A pointer to the object we want to lock. |
lock_how,file,func,line,var |
Definition at line 342 of file astobj2.c.
References __ao2_trylock(), __ast_pthread_mutex_trylock(), __ast_rwlock_tryrdlock(), __ast_rwlock_trywrlock(), __INTERNAL_OBJ_CHECK, __LOG_ERROR, AO2_ALLOC_OPT_LOCK_MASK, AO2_ALLOC_OPT_LOCK_MUTEX, AO2_ALLOC_OPT_LOCK_NOLOCK, AO2_ALLOC_OPT_LOCK_OBJ, AO2_ALLOC_OPT_LOCK_RWLOCK, AO2_LOCK_REQ_MUTEX, AO2_LOCK_REQ_RDLOCK, AO2_LOCK_REQ_WRLOCK, ast_atomic_fetchadd_int(), ast_log, make_ari_stubs::file, INTERNAL_OBJ_LOCKOBJ, INTERNAL_OBJ_MUTEX, INTERNAL_OBJ_RWLOCK, ao2_lock_priv::lock, ao2_rwlock_priv::lock, ao2_lockobj_priv::lock, astobj2_lockobj::lockobj, __priv_data::lockused, astobj2_lock::mutex, NULL, ao2_rwlock_priv::num_lockers, __priv_data::options, astobj2::priv_data, ref_log, astobj2_rwlock::rwlock, astobj2::user_data, astobj2_lockobj::user_data, and var.
Referenced by __ao2_trylock(), _ast_bridge_channel_trylock(), and _ast_bridge_trylock().
int __ao2_unlock | ( | void * | a, |
const char * | file, | ||
const char * | func, | ||
int | line, | ||
const char * | var | ||
) |
Unlock an object.
a | A pointer to the object we want unlock. |
file,func,line,var |
Definition at line 288 of file astobj2.c.
References __ao2_unlock(), __ast_pthread_mutex_unlock(), __ast_rwlock_unlock(), __INTERNAL_OBJ_CHECK, __LOG_ERROR, AO2_ALLOC_OPT_LOCK_MASK, AO2_ALLOC_OPT_LOCK_MUTEX, AO2_ALLOC_OPT_LOCK_NOLOCK, AO2_ALLOC_OPT_LOCK_OBJ, AO2_ALLOC_OPT_LOCK_RWLOCK, ast_atomic_fetchadd_int(), ast_log, make_ari_stubs::file, INTERNAL_OBJ_LOCKOBJ, INTERNAL_OBJ_MUTEX, INTERNAL_OBJ_RWLOCK, ao2_lock_priv::lock, ao2_rwlock_priv::lock, ao2_lockobj_priv::lock, astobj2_lockobj::lockobj, astobj2_lock::mutex, NULL, ao2_rwlock_priv::num_lockers, __priv_data::options, astobj2::priv_data, astobj2_rwlock::rwlock, astobj2::user_data, astobj2_lockobj::user_data, and var.
Referenced by __ao2_unlock(), _agent_unlock(), _ast_bridge_channel_unlock(), and _ast_bridge_unlock().
void * __ao2_weakproxy_alloc | ( | size_t | data_size, |
ao2_destructor_fn | destructor_fn, | ||
const char * | tag, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
Definition at line 793 of file astobj2.c.
References __ao2_alloc(), AO2_ALLOC_OPT_LOCK_MUTEX, AO2_WEAK, ast_assert, ast_log, make_ari_stubs::file, INTERNAL_OBJ, LOG_ERROR, __priv_data::magic, NULL, and astobj2::priv_data.
void * __ao2_weakproxy_get_object | ( | void * | weakproxy, |
int | flags, | ||
const char * | tag, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
Definition at line 889 of file astobj2.c.
References __ao2_ref(), __INTERNAL_OBJ_CHECK, ao2_lock, ao2_unlock, AO2_WEAK, make_ari_stubs::file, __priv_data::magic, NULL, OBJ_NOLOCK, astobj2::priv_data, and __priv_data::weakptr.
Referenced by __ao2_weakproxy_find().
int __ao2_weakproxy_ref_object | ( | void * | weakproxy, |
int | delta, | ||
int | flags, | ||
const char * | tag, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
Definition at line 862 of file astobj2.c.
References __ao2_ref(), __INTERNAL_OBJ_CHECK, ao2_lock, ao2_unlock, AO2_WEAK, make_ari_stubs::file, __priv_data::magic, OBJ_NOLOCK, astobj2::priv_data, and __priv_data::weakptr.
int __ao2_weakproxy_set_object | ( | void * | weakproxy, |
void * | obj, | ||
int | flags, | ||
const char * | tag, | ||
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
Definition at line 818 of file astobj2.c.
References __ao2_ref(), __INTERNAL_OBJ_CHECK, ao2_lock, AO2_MAGIC, ao2_unlock, AO2_WEAK, make_ari_stubs::file, __priv_data::magic, OBJ_NOLOCK, astobj2::priv_data, and __priv_data::weakptr.
void * ao2_object_get_lockaddr | ( | void * | obj | ) |
Return the mutex lock address of an object.
[in] | obj | A pointer to the object we want. |
This function comes in handy mainly for debugging locking situations, where the locking trace code reports the lock address, this allows you to correlate against object address, to match objects to reported locks.
Definition at line 476 of file astobj2.c.
References AO2_ALLOC_OPT_LOCK_MASK, AO2_ALLOC_OPT_LOCK_MUTEX, INTERNAL_OBJ_CHECK, INTERNAL_OBJ_MUTEX, ao2_lock_priv::lock, astobj2_lock::mutex, NULL, __priv_data::options, astobj2::priv_data, and astobj2_lock::user_data.
Referenced by ast_serializer_shutdown_group_join(), ast_sip_session_suspend(), bridge_channel_wait(), bridge_manager_thread(), consumer_should_stay(), consumer_wait_for(), consumer_wait_for_completion(), control_wait(), db_sync_thread(), pbx_outgoing_attempt(), rtp_deallocate_transport(), sip_session_suspend_task(), stasis_subscription_join(), transaction_wait(), and wait_for_stimulus().
unsigned int ao2_options_get | ( | void * | obj | ) |
Retrieve the ao2 options used to create the object.
obj | pointer to the (user-defined part) of an object. |
Definition at line 781 of file astobj2.c.
References INTERNAL_OBJ_CHECK, __priv_data::options, and astobj2::priv_data.
Referenced by __ast_named_lock_get(), hash_ao2_alloc_empty_clone(), and rb_ao2_alloc_empty_clone().
int ao2_weakproxy_subscribe | ( | void * | weakproxy, |
ao2_weakproxy_notification_cb | cb, | ||
void * | data, | ||
int | flags | ||
) |
Request notification when weakproxy points to NULL.
weakproxy | The weak object |
cb | Procedure to call when no real object is associated |
data | Passed to cb |
flags | OBJ_NOLOCK to avoid locking weakproxy. |
0 | Success |
-1 | Failure |
Definition at line 934 of file astobj2.c.
References ao2_lock, ao2_unlock, AO2_WEAK, ast_calloc, AST_LIST_INSERT_HEAD, ao2_weakproxy_notification::cb, ao2_weakproxy_notification::data, ao2_weakproxy::destroyed_cb, INTERNAL_OBJ_CHECK, ao2_weakproxy_notification::list, __priv_data::magic, NULL, OBJ_NOLOCK, astobj2::priv_data, sub, and __priv_data::weakptr.
Referenced by __ast_named_lock_get(), __ast_sorcery_open(), AST_TEST_DEFINE(), link_topic_proxy(), and state_alloc().
int ao2_weakproxy_unsubscribe | ( | void * | weakproxy, |
ao2_weakproxy_notification_cb | cb, | ||
void * | data, | ||
int | flags | ||
) |
Remove notification of real object destruction.
weakproxy | The weak object |
cb | Callback to remove from destroy notification list |
data | Data pointer to match |
flags | OBJ_NOLOCK to avoid locking weakproxy. OBJ_MULTIPLE to remove all copies of the same cb / data pair. |
0 | cb / data pair not found, nothing removed. |
-1 | Failure due to invalid parameters. |
Definition at line 973 of file astobj2.c.
References ao2_lock, ao2_unlock, AO2_WEAK, ast_free, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ao2_weakproxy_notification::data, ao2_weakproxy::destroyed_cb, INTERNAL_OBJ_CHECK, ao2_weakproxy_notification::list, __priv_data::magic, OBJ_MULTIPLE, OBJ_NOLOCK, astobj2::priv_data, and sub.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 1157 of file astobj2.c.
References ARRAY_LEN, ast_cli_unregister_multiple(), ast_opt_ref_debug, NULL, and ref_log.
Referenced by astobj2_init().
int astobj2_init | ( | void | ) |
Provided by astobj2.c
Definition at line 1169 of file astobj2.c.
References ARRAY_LEN, ast_cli_register_multiple, ast_config_AST_LOG_DIR, ast_log, ast_opt_ref_debug, ast_register_cleanup(), astobj2_cleanup(), container_init(), LOG_ERROR, NULL, and ref_log.
Referenced by asterisk_daemon().
|
static |
Definition at line 684 of file astobj2.c.
References __ast_calloc(), __LOG_DEBUG, __LOG_ERROR, AO2_ALLOC_OPT_LOCK_MASK, AO2_ALLOC_OPT_LOCK_MUTEX, AO2_ALLOC_OPT_LOCK_NOLOCK, AO2_ALLOC_OPT_LOCK_OBJ, AO2_ALLOC_OPT_LOCK_RWLOCK, AO2_ALLOC_OPT_NO_REF_DEBUG, AO2_MAGIC, ao2_t_bump, ao2_t_ref, ast_atomic_fetchadd_int(), ast_get_tid(), ast_log, ast_mutex_init, ast_rwlock_init, __priv_data::destructor_fn, EXTERNAL_OBJ, make_ari_stubs::file, ao2_lock_priv::lock, ao2_rwlock_priv::lock, ao2_lockobj_priv::lock, astobj2_lockobj::lockobj, __priv_data::magic, astobj2_lock::mutex, NULL, __priv_data::options, options, astobj2::priv_data, astobj2_lock::priv_data, astobj2_rwlock::priv_data, astobj2_lockobj::priv_data, __priv_data::ref_counter, ref_log, and astobj2_rwlock::rwlock.
Referenced by __ao2_alloc(), and __ao2_alloc_with_lockobj().
int internal_is_ao2_object | ( | void * | user_data | ) |
Definition at line 193 of file astobj2.c.
References INTERNAL_OBJ, IS_AO2_MAGIC_BAD, and astobj2::user_data.
void log_bad_ao2 | ( | void * | user_data, |
const char * | file, | ||
int | line, | ||
const char * | func | ||
) |
Definition at line 206 of file astobj2.c.
References __ast_assert_failed(), make_ari_stubs::file, INTERNAL_OBJ, __priv_data::magic, astobj2::priv_data, and astobj2::user_data.
|
static |
Definition at line 44 of file astobj2.c.
Referenced by __ao2_lock(), __ao2_ref(), __ao2_trylock(), astobj2_cleanup(), astobj2_init(), and internal_ao2_alloc().