1 --- a/include/asterisk/lock.h
2 +++ b/include/asterisk/lock.h
13 #ifndef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
14 #include "asterisk/time.h"
16 #define __AST_RWLOCK_INIT_VALUE {0}
17 #endif /* HAVE_PTHREAD_RWLOCK_INITIALIZER */
21 #define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, {{{ 0 }}}, PTHREAD_MUTEX_INIT_VALUE }
23 #define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, PTHREAD_MUTEX_INIT_VALUE }
26 +#define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, PTHREAD_MUTEX_INIT_VALUE }
29 #define AST_MUTEX_INIT_VALUE { PTHREAD_MUTEX_INIT_VALUE, NULL, {1, 0} }
30 #define AST_MUTEX_INIT_VALUE_NOTRACKING { PTHREAD_MUTEX_INIT_VALUE, NULL, {0, 0} }
31 @@ -114,9 +120,11 @@ struct ast_lock_track {
33 const char *func[AST_MAX_REENTRANCY];
34 pthread_t thread_id[AST_MAX_REENTRANCY];
37 struct ast_bt backtrace[AST_MAX_REENTRANCY];
40 pthread_mutex_t reentr_mutex;
43 @@ -264,6 +272,7 @@ enum ast_lock_type {
44 * on the lock. ast_mark_lock_acquired() will mark it as held by this thread.
46 #if !defined(LOW_MEMORY)
49 void ast_store_lock_info(enum ast_lock_type type, const char *filename,
50 int line_num, const char *func, const char *lock_name, void *lock_addr, struct ast_bt *bt);
51 @@ -271,14 +280,22 @@ void ast_store_lock_info(enum ast_lock_t
52 void ast_store_lock_info(enum ast_lock_type type, const char *filename,
53 int line_num, const char *func, const char *lock_name, void *lock_addr);
54 #endif /* HAVE_BKTR */
56 +void ast_store_lock_info(enum ast_lock_type type, const char *filename,
57 + int line_num, const char *func, const char *lock_name, void *lock_addr);
64 #define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS,BUD)
66 #define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS)
67 #endif /* HAVE_BKTR */
69 +#define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS)
71 #endif /* !defined(LOW_MEMORY) */
74 @@ -306,19 +323,27 @@ void ast_mark_lock_failed(void *lock_add
75 * be removed from the current thread's lock info struct.
77 #if !defined(LOW_MEMORY)
80 void ast_remove_lock_info(void *lock_addr, struct ast_bt *bt);
82 void ast_remove_lock_info(void *lock_addr);
83 #endif /* HAVE_BKTR */
85 +void ast_remove_lock_info(void *lock_addr);
87 void ast_suspend_lock_info(void *lock_addr);
88 void ast_restore_lock_info(void *lock_addr);
92 #define ast_remove_lock_info(ignore,me)
94 #define ast_remove_lock_info(ignore)
95 #endif /* HAVE_BKTR */
97 +#define ast_remove_lock_info(ignore)
99 #define ast_suspend_lock_info(ignore);
100 #define ast_restore_lock_info(ignore);
101 #endif /* !defined(LOW_MEMORY) */