48#ifndef _ASTERISK_LOCK_H
49#define _ASTERISK_LOCK_H
58#ifndef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
66#define AST_PTHREADT_NULL (pthread_t) -1
67#define AST_PTHREADT_STOP (pthread_t) -2
69#if (defined(SOLARIS) || defined(BSD))
70#define AST_MUTEX_INIT_W_CONSTRUCTORS
75#if defined(HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) && defined(HAVE_PTHREAD_MUTEX_RECURSIVE_NP)
76#define PTHREAD_MUTEX_INIT_VALUE PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
77#define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE_NP
79#define PTHREAD_MUTEX_INIT_VALUE PTHREAD_MUTEX_INITIALIZER
80#define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE
83#ifdef HAVE_PTHREAD_RWLOCK_INITIALIZER
84#define __AST_RWLOCK_INIT_VALUE PTHREAD_RWLOCK_INITIALIZER
86#define __AST_RWLOCK_INIT_VALUE {0}
90#define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, {{{ 0 }}}, PTHREAD_MUTEX_INIT_VALUE }
92#define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, PTHREAD_MUTEX_INIT_VALUE }
95#define AST_MUTEX_INIT_VALUE { PTHREAD_MUTEX_INIT_VALUE, NULL, {1, 0} }
96#define AST_MUTEX_INIT_VALUE_NOTRACKING { PTHREAD_MUTEX_INIT_VALUE, NULL, {0, 0} }
98#define AST_RWLOCK_INIT_VALUE { __AST_RWLOCK_INIT_VALUE, NULL, {1, 0} }
99#define AST_RWLOCK_INIT_VALUE_NOTRACKING { __AST_RWLOCK_INIT_VALUE, NULL, {0, 0} }
101#define AST_MAX_REENTRANCY 10
137#if !defined(DEBUG_THREADS) && !defined(DEBUG_THREADS_LOOSE_ABI) && \
138 !defined(DETECT_DEADLOCKS)
145#elif defined(DEBUG_THREADS) || defined(DETECT_DEADLOCKS)
159#if !defined(DEBUG_THREADS) && !defined(DEBUG_THREADS_LOOSE_ABI) && \
160 !defined(DETECT_DEADLOCKS)
167#elif defined(DEBUG_THREADS) || defined(DETECT_DEADLOCKS)
186#define ast_mutex_init(pmutex) __ast_pthread_mutex_init(1, __FILE__, __LINE__, __PRETTY_FUNCTION__, #pmutex, pmutex)
187#define ast_mutex_init_notracking(pmutex) __ast_pthread_mutex_init(0, __FILE__, __LINE__, __PRETTY_FUNCTION__, #pmutex, pmutex)
188#define ast_mutex_destroy(a) __ast_pthread_mutex_destroy(__FILE__, __LINE__, __PRETTY_FUNCTION__, #a, a)
189#define ast_mutex_lock(a) __ast_pthread_mutex_lock(__FILE__, __LINE__, __PRETTY_FUNCTION__, #a, a)
190#define ast_mutex_unlock(a) __ast_pthread_mutex_unlock(__FILE__, __LINE__, __PRETTY_FUNCTION__, #a, a)
191#define ast_mutex_trylock(a) __ast_pthread_mutex_trylock(__FILE__, __LINE__, __PRETTY_FUNCTION__, #a, a)
194int __ast_cond_init(
const char *filename,
int lineno,
const char *func,
const char *cond_name,
ast_cond_t *
cond, pthread_condattr_t *cond_attr);
201#define ast_cond_init(cond, attr) __ast_cond_init(__FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, cond, attr)
202#define ast_cond_destroy(cond) __ast_cond_destroy(__FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, cond)
203#define ast_cond_signal(cond) __ast_cond_signal(__FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, cond)
204#define ast_cond_broadcast(cond) __ast_cond_broadcast(__FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, cond)
205#define ast_cond_wait(cond, mutex) __ast_cond_wait(__FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, #mutex, cond, mutex)
206#define ast_cond_timedwait(cond, mutex, time) __ast_cond_timedwait(__FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, #mutex, cond, mutex, time)
224#define ast_rwlock_init(rwlock) __ast_rwlock_init(1, __FILE__, __LINE__, __PRETTY_FUNCTION__, #rwlock, rwlock)
231#define ast_rwlock_init_notracking(rwlock) __ast_rwlock_init(0, __FILE__, __LINE__, __PRETTY_FUNCTION__, #rwlock, rwlock)
233#define ast_rwlock_destroy(rwlock) __ast_rwlock_destroy(__FILE__, __LINE__, __PRETTY_FUNCTION__, #rwlock, rwlock)
234#define ast_rwlock_unlock(a) __ast_rwlock_unlock(__FILE__, __LINE__, __PRETTY_FUNCTION__, a, #a)
235#define ast_rwlock_rdlock(a) __ast_rwlock_rdlock(__FILE__, __LINE__, __PRETTY_FUNCTION__, a, #a)
236#define ast_rwlock_wrlock(a) __ast_rwlock_wrlock(__FILE__, __LINE__, __PRETTY_FUNCTION__, a, #a)
237#define ast_rwlock_tryrdlock(a) __ast_rwlock_tryrdlock(__FILE__, __LINE__, __PRETTY_FUNCTION__, a, #a)
238#define ast_rwlock_trywrlock(a) __ast_rwlock_trywrlock(__FILE__, __LINE__, __PRETTY_FUNCTION__, a, #a)
239#define ast_rwlock_timedrdlock(a, b) __ast_rwlock_timedrdlock(__FILE__, __LINE__, __PRETTY_FUNCTION__, a, #a, b)
240#define ast_rwlock_timedwrlock(a, b) __ast_rwlock_timedwrlock(__FILE__, __LINE__, __PRETTY_FUNCTION__, a, #a, b)
242#define ROFFSET ((lt->reentrancy > 0) ? (lt->reentrancy-1) : 0)
247#define DO_THREAD_CRASH do { *((int *)(0)) = 1; } while(0)
249#define DO_THREAD_CRASH do { } while (0)
269 int line_num,
const char *func,
const char *lock_name,
void *lock_addr,
struct ast_bt *bt);
274void ast_mark_lock_acquired(
void *lock_addr);
287void ast_remove_lock_info(
void *lock_addr,
struct ast_bt *bt);
288void ast_suspend_lock_info(
void *lock_addr);
289void ast_restore_lock_info(
void *lock_addr);
301void ast_log_show_lock(
void *this_lock_addr);
316struct ast_str *ast_dump_locks(
void);
324int ast_find_lock_info(
void *lock_addr,
char *filename,
size_t filename_size,
int *lineno,
char *func,
size_t func_size,
char *mutex_name,
size_t mutex_name_size);
332#define AO2_DEADLOCK_AVOIDANCE(obj) \
334 char __filename[80], __func[80], __mutex_name[80]; \
336 int __res = ast_find_lock_info(ao2_object_get_lockaddr(obj), __filename, sizeof(__filename), &__lineno, __func, sizeof(__func), __mutex_name, sizeof(__mutex_name)); \
337 int __res2 = ao2_unlock(obj); \
341 ast_log(LOG_WARNING, "Could not unlock ao2 object '%s': %s and no lock info found! I will NOT try to relock.\n", #obj, strerror(__res2)); \
347 ast_log(LOG_WARNING, "Could not unlock ao2 object '%s': %s. {{{Originally locked at %s line %d: (%s) '%s'}}} I will NOT try to relock.\n", #obj, strerror(__res2), __filename, __lineno, __func, __mutex_name); \
349 __ao2_lock(obj, AO2_LOCK_REQ_MUTEX, __filename, __func, __lineno, __mutex_name); \
354#define CHANNEL_DEADLOCK_AVOIDANCE(chan) \
356 char __filename[80], __func[80], __mutex_name[80]; \
358 int __res = ast_find_lock_info(ao2_object_get_lockaddr(chan), __filename, sizeof(__filename), &__lineno, __func, sizeof(__func), __mutex_name, sizeof(__mutex_name)); \
359 int __res2 = ast_channel_unlock(chan); \
363 ast_log(LOG_WARNING, "Could not unlock channel '%s': %s and no lock info found! I will NOT try to relock.\n", #chan, strerror(__res2)); \
365 ast_channel_lock(chan); \
369 ast_log(LOG_WARNING, "Could not unlock channel '%s': %s. {{{Originally locked at %s line %d: (%s) '%s'}}} I will NOT try to relock.\n", #chan, strerror(__res2), __filename, __lineno, __func, __mutex_name); \
371 __ao2_lock(chan, AO2_LOCK_REQ_MUTEX, __filename, __func, __lineno, __mutex_name); \
376#define DEADLOCK_AVOIDANCE(lock) \
378 char __filename[80], __func[80], __mutex_name[80]; \
380 int __res = ast_find_lock_info(lock, __filename, sizeof(__filename), &__lineno, __func, sizeof(__func), __mutex_name, sizeof(__mutex_name)); \
381 int __res2 = ast_mutex_unlock(lock); \
385 ast_mutex_lock(lock); \
387 ast_log(LOG_WARNING, "Could not unlock mutex '%s': %s and no lock info found! I will NOT try to relock.\n", #lock, strerror(__res2)); \
391 __ast_pthread_mutex_lock(__filename, __lineno, __func, __mutex_name, lock); \
393 ast_log(LOG_WARNING, "Could not unlock mutex '%s': %s. {{{Originally locked at %s line %d: (%s) '%s'}}} I will NOT try to relock.\n", #lock, strerror(__res2), __filename, __lineno, __func, __mutex_name); \
410#define DLA_UNLOCK(lock) \
412 char __filename[80], __func[80], __mutex_name[80]; \
414 int __res = ast_find_lock_info(lock, __filename, sizeof(__filename), &__lineno, __func, sizeof(__func), __mutex_name, sizeof(__mutex_name)); \
415 int __res2 = ast_mutex_unlock(lock);
429#define DLA_LOCK(lock) \
432 ast_log(LOG_WARNING, "Could not unlock mutex '%s': %s and no lock info found! I will NOT try to relock.\n", #lock, strerror(__res2)); \
434 ast_mutex_lock(lock); \
438 ast_log(LOG_WARNING, "Could not unlock mutex '%s': %s. {{{Originally locked at %s line %d: (%s) '%s'}}} I will NOT try to relock.\n", #lock, strerror(__res2), __filename, __lineno, __func, __mutex_name); \
440 __ast_pthread_mutex_lock(__filename, __lineno, __func, __mutex_name, lock); \
449 fprintf(stderr,
"ast_reentrancy_lock failed: '%s' (%d)\n", strerror(res), res);
450#if defined(DO_CRASH) || defined(THREAD_CRASH)
456static inline void ast_reentrancy_unlock(
struct ast_lock_track *lt)
460 fprintf(stderr,
"ast_reentrancy_unlock failed: '%s' (%d)\n", strerror(res), res);
461#if defined(DO_CRASH) || defined(THREAD_CRASH)
469#define AO2_DEADLOCK_AVOIDANCE(obj) \
474#define CHANNEL_DEADLOCK_AVOIDANCE(chan) \
475 ast_channel_unlock(chan); \
477 ast_channel_lock(chan);
479#define DEADLOCK_AVOIDANCE(lock) \
482 if (!(__res = ast_mutex_unlock(lock))) { \
484 ast_mutex_lock(lock); \
486 ast_log(LOG_WARNING, "Failed to unlock mutex '%s' (%s). I will NOT try to relock. {{{ THIS IS A BUG. }}}\n", #lock, strerror(__res)); \
490#define DLA_UNLOCK(lock) ast_mutex_unlock(lock)
492#define DLA_LOCK(lock) ast_mutex_lock(lock)
496#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS)
501#define __AST_MUTEX_DEFINE(scope, mutex, init_val, track) \
502 scope ast_mutex_t mutex = init_val; \
503static void __attribute__((constructor)) init_##mutex(void) \
506 ast_mutex_init(&mutex); \
508 ast_mutex_init_notracking(&mutex); \
511static void __attribute__((destructor)) fini_##mutex(void) \
513 ast_mutex_destroy(&mutex); \
517#define __AST_MUTEX_DEFINE(scope, mutex, init_val, track) scope ast_mutex_t mutex = init_val
520#define AST_MUTEX_DEFINE_STATIC(mutex) __AST_MUTEX_DEFINE(static, mutex, AST_MUTEX_INIT_VALUE, 1)
521#define AST_MUTEX_DEFINE_STATIC_NOTRACKING(mutex) __AST_MUTEX_DEFINE(static, mutex, AST_MUTEX_INIT_VALUE_NOTRACKING, 0)
525#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
526#define __AST_RWLOCK_DEFINE(scope, rwlock, init_val, track) \
527 scope ast_rwlock_t rwlock = init_val; \
528static void __attribute__((constructor)) init_##rwlock(void) \
531 ast_rwlock_init(&rwlock); \
533 ast_rwlock_init_notracking(&rwlock); \
535static void __attribute__((destructor)) fini_##rwlock(void) \
537 ast_rwlock_destroy(&rwlock); \
540#define __AST_RWLOCK_DEFINE(scope, rwlock, init_val, track) scope ast_rwlock_t rwlock = init_val
543#define AST_RWLOCK_DEFINE_STATIC(rwlock) __AST_RWLOCK_DEFINE(static, rwlock, AST_RWLOCK_INIT_VALUE, 1)
544#define AST_RWLOCK_DEFINE_STATIC_NOTRACKING(rwlock) __AST_RWLOCK_DEFINE(static, rwlock, AST_RWLOCK_INIT_VALUE_NOTRACKING, 0)
583#define SCOPED_LOCK(varname, lock, lockfunc, unlockfunc) \
584 RAII_VAR(typeof((lock)), varname, ({lockfunc((lock)); (lock); }), unlockfunc)
589#define SCOPED_MUTEX(varname, lock) SCOPED_LOCK(varname, (lock), ast_mutex_lock, ast_mutex_unlock)
594#define SCOPED_RDLOCK(varname, lock) SCOPED_LOCK(varname, (lock), ast_rwlock_rdlock, ast_rwlock_unlock)
599#define SCOPED_WRLOCK(varname, lock) SCOPED_LOCK(varname, (lock), ast_rwlock_wrlock, ast_rwlock_unlock)
604#define SCOPED_AO2LOCK(varname, obj) SCOPED_LOCK(varname, (obj), ao2_lock, ao2_unlock)
609#define SCOPED_AO2RDLOCK(varname, obj) SCOPED_LOCK(varname, (obj), ao2_rdlock, ao2_unlock)
614#define SCOPED_AO2WRLOCK(varname, obj) SCOPED_LOCK(varname, (obj), ao2_wrlock, ao2_unlock)
619#define SCOPED_CHANNELLOCK(varname, chan) SCOPED_LOCK(varname, (chan), ast_channel_lock, ast_channel_unlock)
622#define pthread_mutex_t use_ast_mutex_t_instead_of_pthread_mutex_t
623#define pthread_cond_t use_ast_cond_t_instead_of_pthread_cond_t
625#define pthread_mutex_lock use_ast_mutex_lock_instead_of_pthread_mutex_lock
626#define pthread_mutex_unlock use_ast_mutex_unlock_instead_of_pthread_mutex_unlock
627#define pthread_mutex_trylock use_ast_mutex_trylock_instead_of_pthread_mutex_trylock
628#define pthread_mutex_init use_ast_mutex_init_instead_of_pthread_mutex_init
629#define pthread_mutex_destroy use_ast_mutex_destroy_instead_of_pthread_mutex_destroy
630#define pthread_cond_init use_ast_cond_init_instead_of_pthread_cond_init
631#define pthread_cond_destroy use_ast_cond_destroy_instead_of_pthread_cond_destroy
632#define pthread_cond_signal use_ast_cond_signal_instead_of_pthread_cond_signal
633#define pthread_cond_broadcast use_ast_cond_broadcast_instead_of_pthread_cond_broadcast
634#define pthread_cond_wait use_ast_cond_wait_instead_of_pthread_cond_wait
635#define pthread_cond_timedwait use_ast_cond_timedwait_instead_of_pthread_cond_timedwait
637#define AST_MUTEX_INITIALIZER __use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__
639#define gethostbyname __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__
642#define pthread_create __use_ast_pthread_create_instead__
667#if defined(HAVE_C_ATOMICS)
669#define ast_atomic_fetch_add(ptr, val, memorder) __atomic_fetch_add((ptr), (val), (memorder))
670#define ast_atomic_add_fetch(ptr, val, memorder) __atomic_add_fetch((ptr), (val), (memorder))
673#define ast_atomic_fetch_sub(ptr, val, memorder) __atomic_fetch_sub((ptr), (val), (memorder))
674#define ast_atomic_sub_fetch(ptr, val, memorder) __atomic_sub_fetch((ptr), (val), (memorder))
677#define ast_atomic_fetch_and(ptr, val, memorder) __atomic_fetch_and((ptr), (val), (memorder))
678#define ast_atomic_and_fetch(ptr, val, memorder) __atomic_and_fetch((ptr), (val), (memorder))
681#define ast_atomic_fetch_or(ptr, val, memorder) __atomic_fetch_or((ptr), (val), (memorder))
682#define ast_atomic_or_fetch(ptr, val, memorder) __atomic_or_fetch((ptr), (val), (memorder))
685#define ast_atomic_fetch_xor(ptr, val, memorder) __atomic_fetch_xor((ptr), (val), (memorder))
686#define ast_atomic_xor_fetch(ptr, val, memorder) __atomic_xor_fetch((ptr), (val), (memorder))
693#define ast_atomic_compare_exchange_n(ptr, expected, desired, success_memorder, failure_memorder) \
694 __atomic_compare_exchange_n((ptr), (expected), (desired), 0, success_memorder, failure_memorder)
696#define ast_atomic_compare_exchange(ptr, expected, desired, success_memorder, failure_memorder) \
697 __atomic_compare_exchange((ptr), (expected), (desired), 0, success_memorder, failure_memorder)
700#elif defined(HAVE_GCC_ATOMICS)
702#define ast_atomic_fetch_add(ptr, val, memorder) __sync_fetch_and_add((ptr), (val))
703#define ast_atomic_add_fetch(ptr, val, memorder) __sync_add_and_fetch((ptr), (val))
706#define ast_atomic_fetch_sub(ptr, val, memorder) __sync_fetch_and_sub((ptr), (val))
707#define ast_atomic_sub_fetch(ptr, val, memorder) __sync_sub_and_fetch((ptr), (val))
710#define ast_atomic_fetch_and(ptr, val, memorder) __sync_fetch_and_and((ptr), (val))
711#define ast_atomic_and_fetch(ptr, val, memorder) __sync_and_and_fetch((ptr), (val))
714#define ast_atomic_fetch_or(ptr, val, memorder) __sync_fetch_and_or((ptr), (val))
715#define ast_atomic_or_fetch(ptr, val, memorder) __sync_or_and_fetch((ptr), (val))
718#define ast_atomic_fetch_xor(ptr, val, memorder) __sync_fetch_and_xor((ptr), (val))
719#define ast_atomic_xor_fetch(ptr, val, memorder) __sync_xor_and_fetch((ptr), (val))
731#define ast_atomic_compare_exchange_n(ptr, expected, desired, success_memorder, failure_memorder) \
732 __sync_bool_compare_and_swap((ptr), *(expected), (desired))
734#define ast_atomic_compare_exchange(ptr, expected, desired, success_memorder, failure_memorder) \
735 __sync_bool_compare_and_swap((ptr), *(expected), *(desired))
739#error "Atomics not available."
743#define ast_atomic_flag_set(ptr, val, memorder) ast_atomic_fetch_or((ptr), (val), (memorder))
746#define ast_atomic_flag_clear(ptr, val, memorder) ast_atomic_fetch_and((ptr), ~(val), (memorder))
Asterisk backtrace generation.
Compiler-specific macros and other items.
void ast_mark_lock_failed(void *lock_addr)
Support for logging to various files, console and syslog Configuration in file logger....
Inlinable API function macro.
#define AST_INLINE_API(hdr, body)
#define AST_MAX_REENTRANCY
int __ast_rwlock_wrlock(const char *filename, int lineno, const char *func, ast_rwlock_t *t, const char *name)
int __ast_rwlock_destroy(const char *filename, int lineno, const char *func, const char *rwlock_name, ast_rwlock_t *t)
int __ast_cond_broadcast(const char *filename, int lineno, const char *func, const char *cond_name, ast_cond_t *cond)
int __ast_rwlock_trywrlock(const char *filename, int lineno, const char *func, ast_rwlock_t *t, const char *name)
int __ast_rwlock_unlock(const char *filename, int lineno, const char *func, ast_rwlock_t *t, const char *name)
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_timedrdlock(const char *filename, int lineno, const char *func, ast_rwlock_t *t, const char *name, const struct timespec *abs_timeout)
#define pthread_mutex_lock
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_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_atomic_fetchadd_int(volatile int *p, int v)
Atomically add v to *p and return the previous value of *p.
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_signal(const char *filename, int lineno, const char *func, const char *cond_name, ast_cond_t *cond)
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_init(int tracking, const char *filename, int lineno, const char *func, const char *mutex_name, ast_mutex_t *t)
int __ast_rwlock_timedwrlock(const char *filename, int lineno, const char *func, ast_rwlock_t *t, const char *name, const struct timespec *abs_timeout)
#define ast_atomic_sub_fetch(ptr, val, memorder)
pthread_cond_t ast_cond_t
int __ast_pthread_mutex_trylock(const char *filename, int lineno, const char *func, const char *mutex_name, ast_mutex_t *t)
#define pthread_mutex_unlock
int __ast_cond_destroy(const char *filename, int lineno, const char *func, const char *cond_name, ast_cond_t *cond)
int ast_atomic_dec_and_test(volatile int *p)
decrement *p by 1 and return true if the variable has reached 0.
int __ast_rwlock_tryrdlock(const char *filename, int lineno, const char *func, ast_rwlock_t *t, const char *name)
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_unlock(const char *filename, int lineno, const char *func, const char *mutex_name, ast_mutex_t *t)
int __ast_rwlock_rdlock(const char *filename, int lineno, const char *func, ast_rwlock_t *t, const char *name)
#define ast_atomic_fetch_add(ptr, val, memorder)
Support for atomic instructions.
A structure to hold backtrace information. This structure provides an easy means to store backtrace i...
Main Channel structure associated with a channel.
volatile unsigned int setup
Lock tracking information.
struct ast_bt backtrace[AST_MAX_REENTRANCY]
pthread_t thread_id[AST_MAX_REENTRANCY]
int lineno[AST_MAX_REENTRANCY]
pthread_mutex_t reentr_mutex
const char * file[AST_MAX_REENTRANCY]
const char * func[AST_MAX_REENTRANCY]
Structure for mutex and tracking information.
struct ast_lock_track * _track
struct ast_lock_track_flags _flags
Structure for rwlock and tracking information.
struct ast_lock_track * _track
struct ast_lock_track_flags _flags
Support for dynamic strings.
Time-related functions and macros.