lock: Replace __ast_mutex_logger with private log_mutex_error.

__ast_mutex_logger used the variable `canlog` without accepting it as a
argument.  Replace with internal macro `log_mutex_error` which takes
canlog as the first arguement.  This will prevent confusion when working
with lock.c code, many of the function declare the canlog variable and
in some cases it previously appeared to be unused.

Change-Id: I83b372cb0654c5c18eadc512f65a57fa6c2e9853
This commit is contained in:
Corey Farrell
2018-09-28 14:31:37 -04:00
parent b7cb2c90e6
commit 655a962aa5
3 changed files with 73 additions and 64 deletions
-2
View File
@@ -241,8 +241,6 @@ int __ast_rwlock_trywrlock(const char *filename, int lineno, const char *func, a
#ifdef DEBUG_THREADS
#define __ast_mutex_logger(...) do { if (canlog) ast_log(LOG_ERROR, __VA_ARGS__); else fprintf(stderr, __VA_ARGS__); } while (0)
#ifdef THREAD_CRASH
#define DO_THREAD_CRASH do { *((int *)(0)) = 1; } while(0)
#else