34#define NAMED_LOCKS_BUCKETS 101
75 int keylen = strlen(keyspace) + strlen(key) + 2;
78 sprintf(concat_key,
"%s-%s", keyspace, key);
82 __PRETTY_FUNCTION__, filename, lineno, func);
102 goto failure_cleanup;
106 goto failure_cleanup;
109 strcpy(proxy->
key, concat_key);
112 ao2_t_ref(proxy, -1,
"Release allocation reference");
Prototypes for public functions only of internal interest,.
Asterisk main include file. File version handling, generic pbx functions.
int ast_register_cleanup(void(*func)(void))
Register a function to be executed before Asterisk gracefully exits.
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
#define ao2_weakproxy_set_object(weakproxy, obj, flags)
Associate weakproxy with obj.
int ao2_weakproxy_subscribe(void *weakproxy, ao2_weakproxy_notification_cb cb, void *data, int flags)
Request notification when weakproxy points to NULL.
#define ao2_t_ref(o, delta, tag)
unsigned int ao2_options_get(void *obj)
Retrieve the ao2 options used to create the object.
@ AO2_ALLOC_OPT_LOCK_MUTEX
@ AO2_ALLOC_OPT_LOCK_MASK
#define AO2_STRING_FIELD_CMP_FN(stype, field)
Creates a compare function for a structure string field.
#define ao2_unlink(container, obj)
Remove an object from a container.
#define ao2_link_flags(container, obj, flags)
Add an object to a container.
#define ao2_t_weakproxy_alloc(data_size, destructor_fn, tag)
void * __ao2_weakproxy_find(struct ao2_container *c, const void *arg, enum search_flags flags, const char *tag, const char *file, int line, const char *func)
#define AO2_STRING_FIELD_HASH_FN(stype, field)
Creates a hash function for a structure string field.
@ OBJ_NOLOCK
Assume that the ao2_container is already locked.
@ OBJ_SEARCH_KEY
The arg parameter is a search key, but is not an object.
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) attribute_warn_unused_result
#define ao2_container_alloc_hash(ao2_options, container_options, n_buckets, hash_fn, sort_fn, cmp_fn)
Allocate and initialize a hash container with the desired number of buckets.
struct ast_named_lock * __ast_named_lock_get(const char *filename, int lineno, const char *func, enum ast_named_lock_type lock_type, const char *keyspace, const char *key)
ast_named_lock_type
Which type of lock to request.
#define NAMED_LOCKS_BUCKETS
static void named_lock_proxy_cb(void *weakproxy, void *data)
static void named_locks_shutdown(void)
int ast_named_locks_init(void)
struct ao2_container * named_locks