1 Index: asterisk-13.4.0/include/asterisk/lock.h
2 ===================================================================
3 --- asterisk-13.4.0.orig/include/asterisk/lock.h
4 +++ asterisk-13.4.0/include/asterisk/lock.h
15 #ifndef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
16 #include "asterisk/time.h"
18 #define __AST_RWLOCK_INIT_VALUE {0}
19 #endif /* HAVE_PTHREAD_RWLOCK_INITIALIZER */
23 #define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, {{{ 0 }}}, PTHREAD_MUTEX_INIT_VALUE }
25 #define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, PTHREAD_MUTEX_INIT_VALUE }
28 +#define AST_LOCK_TRACK_INIT_VALUE { { NULL }, { 0 }, 0, { NULL }, { 0 }, PTHREAD_MUTEX_INIT_VALUE }
31 #define AST_MUTEX_INIT_VALUE { PTHREAD_MUTEX_INIT_VALUE, NULL, 1 }
32 #define AST_MUTEX_INIT_VALUE_NOTRACKING { PTHREAD_MUTEX_INIT_VALUE, NULL, 0 }
33 @@ -114,9 +120,11 @@ struct ast_lock_track {
35 const char *func[AST_MAX_REENTRANCY];
36 pthread_t thread[AST_MAX_REENTRANCY];
39 struct ast_bt backtrace[AST_MAX_REENTRANCY];
42 pthread_mutex_t reentr_mutex;
45 @@ -241,6 +249,7 @@ enum ast_lock_type {
46 * on the lock. ast_mark_lock_acquired() will mark it as held by this thread.
48 #if !defined(LOW_MEMORY)
51 void ast_store_lock_info(enum ast_lock_type type, const char *filename,
52 int line_num, const char *func, const char *lock_name, void *lock_addr, struct ast_bt *bt);
53 @@ -248,14 +257,22 @@ void ast_store_lock_info(enum ast_lock_t
54 void ast_store_lock_info(enum ast_lock_type type, const char *filename,
55 int line_num, const char *func, const char *lock_name, void *lock_addr);
56 #endif /* HAVE_BKTR */
58 +void ast_store_lock_info(enum ast_lock_type type, const char *filename,
59 + int line_num, const char *func, const char *lock_name, void *lock_addr);
66 #define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS,BUD)
68 #define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS)
69 #endif /* HAVE_BKTR */
71 +#define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS)
73 #endif /* !defined(LOW_MEMORY) */
76 @@ -283,19 +300,27 @@ void ast_mark_lock_failed(void *lock_add
77 * be removed from the current thread's lock info struct.
79 #if !defined(LOW_MEMORY)
82 void ast_remove_lock_info(void *lock_addr, struct ast_bt *bt);
84 void ast_remove_lock_info(void *lock_addr);
85 #endif /* HAVE_BKTR */
87 +void ast_remove_lock_info(void *lock_addr);
89 void ast_suspend_lock_info(void *lock_addr);
90 void ast_restore_lock_info(void *lock_addr);
94 #define ast_remove_lock_info(ignore,me)
96 #define ast_remove_lock_info(ignore)
97 #endif /* HAVE_BKTR */
99 +#define ast_remove_lock_info(ignore)
101 #define ast_suspend_lock_info(ignore);
102 #define ast_restore_lock_info(ignore);
103 #endif /* !defined(LOW_MEMORY) */