diff options
author | Corey Farrell <git@cfware.com> | 2017-10-23 01:55:18 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2017-10-24 16:11:39 -0400 |
commit | 569e9a8391ab12bbf4274ee2fd6f0e9462a56923 (patch) | |
tree | 41c958283f324f4f7975f604ba67dea29af2432a /utils | |
parent | 0b05dafc8975bccbf2570f1a632c315137a3c8c4 (diff) |
Single API for ast_store_lock_info and ast_remove_lock_info.
This makes the 'bt' parameter unconditional for ast_store_lock_info and
ast_remove_lock_info. The 'bt' parameter is unused when HAVE_BKTR is
undefined.
Change-Id: Ieced0e920928b735a39c3b5952b806c473d67453
Diffstat (limited to 'utils')
-rw-r--r-- | utils/ael_main.c | 11 | ||||
-rw-r--r-- | utils/check_expr.c | 16 | ||||
-rw-r--r-- | utils/conf2ael.c | 12 |
3 files changed, 3 insertions, 36 deletions
diff --git a/utils/ael_main.c b/utils/ael_main.c index f22e9a05b..3a91ef167 100644 --- a/utils/ael_main.c +++ b/utils/ael_main.c @@ -601,7 +601,6 @@ unsigned int ast_hashtab_hash_contexts(const void *obj) void ast_mark_lock_acquired(void *lock_addr) { } -#ifdef HAVE_BKTR void ast_remove_lock_info(void *lock_addr, struct ast_bt *bt) { } @@ -611,6 +610,7 @@ void ast_store_lock_info(enum ast_lock_type type, const char *filename, { } +#ifdef HAVE_BKTR int __ast_bt_get_addresses(struct ast_bt *bt) { return 0; @@ -627,15 +627,6 @@ char **__ast_bt_get_symbols(void **addresses, size_t num_frames) } return foo; } -#else -void ast_remove_lock_info(void *lock_addr) -{ -} - -void ast_store_lock_info(enum ast_lock_type type, const char *filename, - int line_num, const char *func, const char *lock_name, void *lock_addr) -{ -} #endif /* HAVE_BKTR */ void ast_suspend_lock_info(void *lock_addr) { diff --git a/utils/check_expr.c b/utils/check_expr.c index 201fa04d2..e15705e1b 100644 --- a/utils/check_expr.c +++ b/utils/check_expr.c @@ -55,7 +55,6 @@ void * attribute_malloc __ast_calloc(size_t num, size_t len, const char *file, i #endif #ifdef DEBUG_THREADS -#ifdef HAVE_BKTR void ast_store_lock_info(enum ast_lock_type type, const char *filename, int line_num, const char *func, const char *lock_name, void *lock_addr, struct ast_bt *bt); void ast_store_lock_info(enum ast_lock_type type, const char *filename, @@ -70,6 +69,7 @@ void ast_remove_lock_info(void *lock_addr, struct ast_bt *bt) /* not a lot to do in a standalone w/o threading! */ } +#ifdef HAVE_BKTR int __ast_bt_get_addresses(struct ast_bt *bt); int __ast_bt_get_addresses(struct ast_bt *bt) { @@ -88,20 +88,6 @@ char **__ast_bt_get_symbols(void **addresses, size_t num_frames) } return foo; } -#else -void ast_store_lock_info(enum ast_lock_type type, const char *filename, - int line_num, const char *func, const char *lock_name, void *lock_addr); -void ast_store_lock_info(enum ast_lock_type type, const char *filename, - int line_num, const char *func, const char *lock_name, void *lock_addr) -{ - /* not a lot to do in a standalone w/o threading! */ -} - -void ast_remove_lock_info(void *lock_addr); -void ast_remove_lock_info(void *lock_addr) -{ - /* not a lot to do in a standalone w/o threading! */ -} #endif /* HAVE_BKTR */ void ast_suspend_lock_info(void *lock_addr) diff --git a/utils/conf2ael.c b/utils/conf2ael.c index 5fdc570a0..567dc56f1 100644 --- a/utils/conf2ael.c +++ b/utils/conf2ael.c @@ -699,7 +699,6 @@ unsigned int ast_hashtab_hash_contexts(const void *obj) void ast_mark_lock_acquired(void *lock_addr) { } -#ifdef HAVE_BKTR void ast_remove_lock_info(void *lock_addr, struct ast_bt *bt) { } @@ -709,6 +708,7 @@ void ast_store_lock_info(enum ast_lock_type type, const char *filename, { } +#ifdef HAVE_BKTR int __ast_bt_get_addresses(struct ast_bt *bt) { return 0; @@ -725,16 +725,6 @@ char **__ast_bt_get_symbols(void **addresses, size_t num_frames) } return foo; } - -#else -void ast_remove_lock_info(void *lock_addr) -{ -} - -void ast_store_lock_info(enum ast_lock_type type, const char *filename, - int line_num, const char *func, const char *lock_name, void *lock_addr) -{ -} #endif /* HAVE_BKTR */ void ast_suspend_lock_info(void *lock_addr) { |