Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
General Asterisk locking. More...
#include "asterisk.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/manager.h"
Go to the source code of this file.
Functions | |
int | __ast_cond_broadcast (const char *filename, int lineno, const char *func, const char *cond_name, ast_cond_t *cond) |
int | __ast_cond_destroy (const char *filename, int lineno, const char *func, const char *cond_name, ast_cond_t *cond) |
int | __ast_cond_init (const char *filename, int lineno, const char *func, const char *cond_name, ast_cond_t *cond, pthread_condattr_t *cond_attr) |
int | __ast_cond_signal (const char *filename, int lineno, const char *func, const char *cond_name, ast_cond_t *cond) |
int | __ast_cond_timedwait (const char *filename, int lineno, const char *func, const char *cond_name, const char *mutex_name, ast_cond_t *cond, ast_mutex_t *t, const struct timespec *abstime) |
int | __ast_cond_wait (const char *filename, int lineno, const char *func, const char *cond_name, const char *mutex_name, ast_cond_t *cond, ast_mutex_t *t) |
int | __ast_pthread_mutex_destroy (const char *filename, int lineno, const char *func, const char *mutex_name, ast_mutex_t *t) |
int | __ast_pthread_mutex_init (int tracking, const char *filename, int lineno, const char *func, const char *mutex_name, ast_mutex_t *t) |
int | __ast_pthread_mutex_lock (const char *filename, int lineno, const char *func, const char *mutex_name, ast_mutex_t *t) |
int | __ast_pthread_mutex_trylock (const char *filename, int lineno, const char *func, const char *mutex_name, ast_mutex_t *t) |
int | __ast_pthread_mutex_unlock (const char *filename, int lineno, const char *func, const char *mutex_name, ast_mutex_t *t) |
int | __ast_rwlock_destroy (const char *filename, int lineno, const char *func, const char *rwlock_name, ast_rwlock_t *t) |
int | __ast_rwlock_init (int tracking, const char *filename, int lineno, const char *func, const char *rwlock_name, ast_rwlock_t *t) |
int | __ast_rwlock_rdlock (const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name) |
int | __ast_rwlock_timedrdlock (const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name, const struct timespec *abs_timeout) |
int | __ast_rwlock_timedwrlock (const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name, const struct timespec *abs_timeout) |
int | __ast_rwlock_tryrdlock (const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name) |
int | __ast_rwlock_trywrlock (const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name) |
int | __ast_rwlock_unlock (const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name) |
int | __ast_rwlock_wrlock (const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name) |
General Asterisk locking.
Definition in file lock.c.
int __ast_cond_broadcast | ( | const char * | filename, |
int | lineno, | ||
const char * | func, | ||
const char * | cond_name, | ||
ast_cond_t * | cond | ||
) |
int __ast_cond_destroy | ( | const char * | filename, |
int | lineno, | ||
const char * | func, | ||
const char * | cond_name, | ||
ast_cond_t * | cond | ||
) |
int __ast_cond_init | ( | const char * | filename, |
int | lineno, | ||
const char * | func, | ||
const char * | cond_name, | ||
ast_cond_t * | cond, | ||
pthread_condattr_t * | cond_attr | ||
) |
int __ast_cond_signal | ( | const char * | filename, |
int | lineno, | ||
const char * | func, | ||
const char * | cond_name, | ||
ast_cond_t * | cond | ||
) |
int __ast_cond_timedwait | ( | const char * | filename, |
int | lineno, | ||
const char * | func, | ||
const char * | cond_name, | ||
const char * | mutex_name, | ||
ast_cond_t * | cond, | ||
ast_mutex_t * | t, | ||
const struct timespec * | abstime | ||
) |
Definition at line 631 of file lock.c.
References ast_lock_track::backtrace, cond, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_mutex_info::mutex, NULL, pthread_cond_timedwait, pthread_mutex_t, ast_lock_track::reentrancy, ROFFSET, and ast_lock_track::thread_id.
int __ast_cond_wait | ( | const char * | filename, |
int | lineno, | ||
const char * | func, | ||
const char * | cond_name, | ||
const char * | mutex_name, | ||
ast_cond_t * | cond, | ||
ast_mutex_t * | t | ||
) |
Definition at line 566 of file lock.c.
References ast_lock_track::backtrace, cond, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_mutex_info::mutex, NULL, pthread_cond_wait, pthread_mutex_t, ast_lock_track::reentrancy, ROFFSET, and ast_lock_track::thread_id.
int __ast_pthread_mutex_destroy | ( | const char * | filename, |
int | lineno, | ||
const char * | func, | ||
const char * | mutex_name, | ||
ast_mutex_t * | t | ||
) |
Definition at line 177 of file lock.c.
References ast_lock_track::backtrace, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_mutex_info::mutex, pthread_mutex_destroy, pthread_mutex_t, pthread_mutex_trylock, pthread_mutex_unlock, ast_lock_track::reentrancy, ROFFSET, and ast_lock_track::thread_id.
int __ast_pthread_mutex_init | ( | int | tracking, |
const char * | filename, | ||
int | lineno, | ||
const char * | func, | ||
const char * | mutex_name, | ||
ast_mutex_t * | t | ||
) |
Definition at line 145 of file lock.c.
References AST_MUTEX_KIND, ast_lock_track::func, ast_lock_track::lineno, ast_mutex_info::mutex, NULL, pthread_mutex_init, and pthread_mutex_t.
int __ast_pthread_mutex_lock | ( | const char * | filename, |
int | lineno, | ||
const char * | func, | ||
const char * | mutex_name, | ||
ast_mutex_t * | t | ||
) |
Definition at line 255 of file lock.c.
References ast_bt_get_addresses, ast_mark(), AST_MAX_REENTRANCY, AST_MUTEX, ast_lock_track::backtrace, EVENT_FLAG_SYSTEM, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, manager_event, ast_mutex_info::mutex, NULL, pthread_mutex_lock, pthread_mutex_trylock, ast_lock_track::reentrancy, ROFFSET, ast_lock_track::thread_id, and tmp().
Referenced by __ao2_lock().
int __ast_pthread_mutex_trylock | ( | const char * | filename, |
int | lineno, | ||
const char * | func, | ||
const char * | mutex_name, | ||
ast_mutex_t * | t | ||
) |
Definition at line 393 of file lock.c.
References ast_bt_get_addresses, ast_mark_lock_failed(), AST_MAX_REENTRANCY, AST_MUTEX, ast_lock_track::backtrace, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_mutex_info::mutex, NULL, pthread_mutex_trylock, ast_lock_track::reentrancy, ast_lock_track::thread_id, and tmp().
Referenced by __ao2_trylock().
int __ast_pthread_mutex_unlock | ( | const char * | filename, |
int | lineno, | ||
const char * | func, | ||
const char * | mutex_name, | ||
ast_mutex_t * | t | ||
) |
Definition at line 448 of file lock.c.
References AST_MAX_REENTRANCY, ast_lock_track::backtrace, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_mutex_info::mutex, NULL, pthread_mutex_t, pthread_mutex_unlock, ast_lock_track::reentrancy, ROFFSET, and ast_lock_track::thread_id.
Referenced by __ao2_unlock().
int __ast_rwlock_destroy | ( | const char * | filename, |
int | lineno, | ||
const char * | func, | ||
const char * | rwlock_name, | ||
ast_rwlock_t * | t | ||
) |
Definition at line 730 of file lock.c.
References __AST_RWLOCK_INIT_VALUE, ast_lock_track::backtrace, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_rwlock_info::lock, ast_lock_track::reentrancy, and ast_lock_track::thread_id.
int __ast_rwlock_init | ( | int | tracking, |
const char * | filename, | ||
int | lineno, | ||
const char * | func, | ||
const char * | rwlock_name, | ||
ast_rwlock_t * | t | ||
) |
Definition at line 696 of file lock.c.
References __AST_RWLOCK_INIT_VALUE, ast_lock_track::func, ast_lock_track::lineno, ast_rwlock_info::lock, and NULL.
int __ast_rwlock_rdlock | ( | const char * | filename, |
int | line, | ||
const char * | func, | ||
ast_rwlock_t * | t, | ||
const char * | name | ||
) |
Definition at line 848 of file lock.c.
References ast_bt_get_addresses, AST_MAX_REENTRANCY, AST_RDLOCK, ast_lock_track::backtrace, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_rwlock_info::lock, name, NULL, ast_lock_track::reentrancy, ast_lock_track::thread_id, and tmp().
Referenced by __ao2_global_obj_ref(), __ao2_lock(), and __ast_heap_rdlock().
int __ast_rwlock_timedrdlock | ( | const char * | filename, |
int | line, | ||
const char * | func, | ||
ast_rwlock_t * | t, | ||
const char * | name, | ||
const struct timespec * | abs_timeout | ||
) |
Definition at line 1055 of file lock.c.
References ast_bt_get_addresses, AST_MAX_REENTRANCY, ast_tvnow(), AST_WRLOCK, ast_lock_track::backtrace, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_rwlock_info::lock, name, NULL, ast_lock_track::reentrancy, ast_lock_track::thread_id, and tmp().
int __ast_rwlock_timedwrlock | ( | const char * | filename, |
int | line, | ||
const char * | func, | ||
ast_rwlock_t * | t, | ||
const char * | name, | ||
const struct timespec * | abs_timeout | ||
) |
Definition at line 1137 of file lock.c.
References ast_bt_get_addresses, AST_MAX_REENTRANCY, ast_tvnow(), AST_WRLOCK, ast_lock_track::backtrace, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_rwlock_info::lock, name, NULL, ast_lock_track::reentrancy, ast_lock_track::thread_id, and tmp().
int __ast_rwlock_tryrdlock | ( | const char * | filename, |
int | line, | ||
const char * | func, | ||
ast_rwlock_t * | t, | ||
const char * | name | ||
) |
Definition at line 1219 of file lock.c.
References ast_bt_get_addresses, ast_mark_lock_failed(), AST_MAX_REENTRANCY, AST_RDLOCK, ast_lock_track::backtrace, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_rwlock_info::lock, name, NULL, ast_lock_track::reentrancy, ast_lock_track::thread_id, and tmp().
Referenced by __ao2_trylock().
int __ast_rwlock_trywrlock | ( | const char * | filename, |
int | line, | ||
const char * | func, | ||
ast_rwlock_t * | t, | ||
const char * | name | ||
) |
Definition at line 1269 of file lock.c.
References ast_bt_get_addresses, ast_mark_lock_failed(), AST_MAX_REENTRANCY, AST_WRLOCK, ast_lock_track::backtrace, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_rwlock_info::lock, name, NULL, ast_lock_track::reentrancy, ast_lock_track::thread_id, and tmp().
Referenced by __ao2_trylock().
int __ast_rwlock_unlock | ( | const char * | filename, |
int | line, | ||
const char * | func, | ||
ast_rwlock_t * | t, | ||
const char * | name | ||
) |
Definition at line 777 of file lock.c.
References __AST_RWLOCK_INIT_VALUE, AST_PTHREADT_NULL, ast_lock_track::backtrace, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_rwlock_info::lock, name, NULL, ast_lock_track::reentrancy, and ast_lock_track::thread_id.
Referenced by __ao2_global_obj_ref(), __ao2_global_obj_replace(), __ao2_unlock(), and __ast_heap_unlock().
int __ast_rwlock_wrlock | ( | const char * | filename, |
int | line, | ||
const char * | func, | ||
ast_rwlock_t * | t, | ||
const char * | name | ||
) |
Definition at line 952 of file lock.c.
References ast_bt_get_addresses, AST_MAX_REENTRANCY, AST_WRLOCK, ast_lock_track::backtrace, ast_lock_track::file, ast_lock_track::func, ast_lock_track::lineno, ast_rwlock_info::lock, name, NULL, ast_lock_track::reentrancy, ast_lock_track::thread_id, and tmp().
Referenced by __ao2_global_obj_replace(), __ao2_lock(), and __ast_heap_wrlock().