[asterisk-commits] mjordan: branch mjordan/1.8_instrumented r362732 - in /team/mjordan/1.8_instr...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 19 17:02:22 CDT 2012
Author: mjordan
Date: Thu Apr 19 17:02:18 2012
New Revision: 362732
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=362732
Log:
Restrict further to just ast_register_thread for wrlock/rdlock
Modified:
team/mjordan/1.8_instrumented/include/asterisk/lock.h
team/mjordan/1.8_instrumented/main/lock.c
Modified: team/mjordan/1.8_instrumented/include/asterisk/lock.h
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/1.8_instrumented/include/asterisk/lock.h?view=diff&rev=362732&r1=362731&r2=362732
==============================================================================
--- team/mjordan/1.8_instrumented/include/asterisk/lock.h (original)
+++ team/mjordan/1.8_instrumented/include/asterisk/lock.h Thu Apr 19 17:02:18 2012
@@ -209,7 +209,7 @@
#ifdef DEBUG_THREADS
-#define __ast_mutex_logger(...) do { if (canlog) ast_log(LOG_ERROR, __VA_ARGS__); else fprintf(stderr, __VA_ARGS__); } while (0)
+#define __ast_mutex_logger(...) do { if (canlog) fprintf(stderr, __VA_ARGS__); else fprintf(stderr, __VA_ARGS__); } while (0)
#ifdef THREAD_CRASH
#define DO_THREAD_CRASH do { *((int *)(0)) = 1; } while(0)
Modified: team/mjordan/1.8_instrumented/main/lock.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/1.8_instrumented/main/lock.c?view=diff&rev=362732&r1=362731&r2=362732
==============================================================================
--- team/mjordan/1.8_instrumented/main/lock.c (original)
+++ team/mjordan/1.8_instrumented/main/lock.c Thu Apr 19 17:02:18 2012
@@ -814,8 +814,11 @@
lt = t->track;
if (t->tracking) {
- ast_reentrancy_lock(lt);
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
+ __ast_mutex_logger("Attempting to grab global lock %p for %p in unlock\n", lt, t);
+ }
+ ast_reentrancy_lock(lt);
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
}
if (lt->reentrancy) {
@@ -847,7 +850,7 @@
filename, line, func, name);
lt->reentrancy = 0;
}
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
}
ast_reentrancy_unlock(lt);
@@ -907,15 +910,18 @@
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_reentrancy_lock(lt);
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
+ __ast_mutex_logger("Attempting to grab global lock %p for %p in rdlock\n", lt, t);
+ }
+ ast_reentrancy_lock(lt);
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
}
if (lt->reentrancy != AST_MAX_REENTRANCY) {
ast_bt_get_addresses(<->backtrace[lt->reentrancy]);
bt = <->backtrace[lt->reentrancy];
}
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock %p released by %s line %d (%s)\n", lt, filename, line, func);
}
ast_reentrancy_unlock(lt);
@@ -939,7 +945,7 @@
filename, line, func, (int)wait_time, name);
if (t->tracking) {
ast_reentrancy_lock(lt);
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
}
#ifdef HAVE_BKTR
@@ -951,7 +957,7 @@
#ifdef HAVE_BKTR
__dump_backtrace(<->backtrace[lt->reentrancy-1], canlog);
#endif
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
}
ast_reentrancy_unlock(lt);
@@ -969,7 +975,7 @@
#ifdef DEBUG_THREADS
if (!res && t->tracking) {
ast_reentrancy_lock(lt);
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
}
if (lt->reentrancy < AST_MAX_REENTRANCY) {
@@ -979,7 +985,7 @@
lt->thread[lt->reentrancy] = pthread_self();
lt->reentrancy++;
}
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
}
ast_reentrancy_unlock(lt);
@@ -990,11 +996,11 @@
#ifdef HAVE_BKTR
if (lt->reentrancy) {
ast_reentrancy_lock(lt);
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
}
bt = <->backtrace[lt->reentrancy-1];
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
}
ast_reentrancy_unlock(lt);
@@ -1051,15 +1057,18 @@
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_reentrancy_lock(lt);
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
+ __ast_mutex_logger("Attempting to grab global lock %p for %p in wrlock\n", lt, t);
+ }
+ ast_reentrancy_lock(lt);
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
}
if (lt->reentrancy != AST_MAX_REENTRANCY) {
ast_bt_get_addresses(<->backtrace[lt->reentrancy]);
bt = <->backtrace[lt->reentrancy];
}
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
}
ast_reentrancy_unlock(lt);
@@ -1083,7 +1092,7 @@
filename, line, func, (int)wait_time, name);
if (t->tracking) {
ast_reentrancy_lock(lt);
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
}
#ifdef HAVE_BKTR
@@ -1095,7 +1104,7 @@
#ifdef HAVE_BKTR
__dump_backtrace(<->backtrace[lt->reentrancy-1], canlog);
#endif
- if (!strcmp(filename, "asterisk.c")) {
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
}
ast_reentrancy_unlock(lt);
@@ -1109,6 +1118,132 @@
#else /* !DETECT_DEADLOCKS || !DEBUG_THREADS */
res = pthread_rwlock_wrlock(&t->lock);
#endif /* !DETECT_DEADLOCKS || !DEBUG_THREADS */
+
+#ifdef DEBUG_THREADS
+ if (!res && t->tracking) {
+ ast_reentrancy_lock(lt);
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
+ __ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
+ }
+ if (lt->reentrancy < AST_MAX_REENTRANCY) {
+ lt->file[lt->reentrancy] = filename;
+ lt->lineno[lt->reentrancy] = line;
+ lt->func[lt->reentrancy] = func;
+ lt->thread[lt->reentrancy] = pthread_self();
+ lt->reentrancy++;
+ }
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
+ __ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
+ }
+ ast_reentrancy_unlock(lt);
+ if (t->tracking) {
+ ast_mark_lock_acquired(t);
+ }
+ } else if (t->tracking) {
+#ifdef HAVE_BKTR
+ if (lt->reentrancy) {
+ ast_reentrancy_lock(lt);
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
+ __ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
+ }
+ bt = <->backtrace[lt->reentrancy-1];
+ if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
+ __ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
+ }
+ ast_reentrancy_unlock(lt);
+ } else {
+ bt = NULL;
+ }
+ if (t->tracking) {
+ ast_remove_lock_info(t, bt);
+ }
+#else
+ if (t->tracking) {
+ ast_remove_lock_info(t);
+ }
+#endif
+ }
+ if (res) {
+ __ast_mutex_logger("%s line %d (%s): Error obtaining write lock: %s\n",
+ filename, line, func, strerror(res));
+ __ast_mutex_logger("Crashing thread %s line %d (%s)\n", filename, line, func);
+ DO_THREAD_CRASH;
+ }
+#endif /* DEBUG_THREADS */
+
+ return res;
+}
+
+int __ast_rwlock_timedrdlock(const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name,
+ const struct timespec *abs_timeout)
+{
+ int res;
+
+#ifdef DEBUG_THREADS
+ struct ast_lock_track *lt;
+ int canlog = strcmp(filename, "logger.c") & t->tracking;
+#ifdef HAVE_BKTR
+ struct ast_bt *bt = NULL;
+#endif
+
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
+ if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
+ /* Don't warn abount uninitialized lock.
+ * Simple try to initialize it.
+ * May be not needed in linux system.
+ */
+ res = __ast_rwlock_init(t->tracking, filename, line, func, name, t);
+ if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
+ __ast_mutex_logger("%s line %d (%s): Error: rwlock '%s' is uninitialized and unable to initialize.\n",
+ filename, line, func, name);
+ return res;
+ }
+ }
+#endif /* AST_MUTEX_INIT_W_CONSTRUCTORS */
+
+ if (t->tracking && !t->track) {
+ ast_reentrancy_init(&t->track);
+ }
+ lt = t->track;
+
+ if (t->tracking) {
+#ifdef HAVE_BKTR
+ ast_reentrancy_lock(lt);
+ if (!strcmp(filename, "asterisk.c")) {
+ __ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
+ }
+ if (lt->reentrancy != AST_MAX_REENTRANCY) {
+ ast_bt_get_addresses(<->backtrace[lt->reentrancy]);
+ bt = <->backtrace[lt->reentrancy];
+ }
+ if (!strcmp(filename, "asterisk.c")) {
+ __ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
+ }
+ ast_reentrancy_unlock(lt);
+ ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t, bt);
+#else
+ ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t);
+#endif
+ }
+#endif /* DEBUG_THREADS */
+
+#ifdef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
+ res = pthread_rwlock_timedrdlock(&t->lock, abs_timeout);
+#else
+ do {
+ struct timeval _start = ast_tvnow(), _diff;
+ for (;;) {
+ if (!(res = pthread_rwlock_tryrdlock(&t->lock))) {
+ break;
+ }
+ _diff = ast_tvsub(ast_tvnow(), _start);
+ if (_diff.tv_sec > abs_timeout->tv_sec || (_diff.tv_sec == abs_timeout->tv_sec && _diff.tv_usec * 1000 > abs_timeout->tv_nsec)) {
+ break;
+ }
+ usleep(1);
+ }
+ } while (0);
+#endif
#ifdef DEBUG_THREADS
if (!res && t->tracking) {
@@ -1145,17 +1280,13 @@
} else {
bt = NULL;
}
- if (t->tracking) {
- ast_remove_lock_info(t, bt);
- }
-#else
- if (t->tracking) {
- ast_remove_lock_info(t);
- }
+ ast_remove_lock_info(t, bt);
+#else
+ ast_remove_lock_info(t);
#endif
}
if (res) {
- __ast_mutex_logger("%s line %d (%s): Error obtaining write lock: %s\n",
+ __ast_mutex_logger("%s line %d (%s): Error obtaining read lock: %s\n",
filename, line, func, strerror(res));
__ast_mutex_logger("Crashing thread %s line %d (%s)\n", filename, line, func);
DO_THREAD_CRASH;
@@ -1165,7 +1296,7 @@
return res;
}
-int __ast_rwlock_timedrdlock(const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name,
+int __ast_rwlock_timedwrlock(const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name,
const struct timespec *abs_timeout)
{
int res;
@@ -1219,12 +1350,12 @@
#endif /* DEBUG_THREADS */
#ifdef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
- res = pthread_rwlock_timedrdlock(&t->lock, abs_timeout);
+ res = pthread_rwlock_timedwrlock(&t->lock, abs_timeout);
#else
do {
struct timeval _start = ast_tvnow(), _diff;
for (;;) {
- if (!(res = pthread_rwlock_tryrdlock(&t->lock))) {
+ if (!(res = pthread_rwlock_trywrlock(&t->lock))) {
break;
}
_diff = ast_tvsub(ast_tvnow(), _start);
@@ -1271,9 +1402,13 @@
} else {
bt = NULL;
}
- ast_remove_lock_info(t, bt);
-#else
- ast_remove_lock_info(t);
+ if (t->tracking) {
+ ast_remove_lock_info(t, bt);
+ }
+#else
+ if (t->tracking) {
+ ast_remove_lock_info(t);
+ }
#endif
}
if (res) {
@@ -1287,8 +1422,7 @@
return res;
}
-int __ast_rwlock_timedwrlock(const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name,
- const struct timespec *abs_timeout)
+int __ast_rwlock_tryrdlock(const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name)
{
int res;
@@ -1298,8 +1432,8 @@
#ifdef HAVE_BKTR
struct ast_bt *bt = NULL;
#endif
-
#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
+
if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
/* Don't warn abount uninitialized lock.
* Simple try to initialize it.
@@ -1333,30 +1467,14 @@
__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
}
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t, bt);
-#else
- ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t);
-#endif
- }
-#endif /* DEBUG_THREADS */
-
-#ifdef HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
- res = pthread_rwlock_timedwrlock(&t->lock, abs_timeout);
-#else
- do {
- struct timeval _start = ast_tvnow(), _diff;
- for (;;) {
- if (!(res = pthread_rwlock_trywrlock(&t->lock))) {
- break;
- }
- _diff = ast_tvsub(ast_tvnow(), _start);
- if (_diff.tv_sec > abs_timeout->tv_sec || (_diff.tv_sec == abs_timeout->tv_sec && _diff.tv_usec * 1000 > abs_timeout->tv_nsec)) {
- break;
- }
- usleep(1);
- }
- } while (0);
-#endif
+ ast_store_lock_info(AST_RDLOCK, filename, line, func, name, t, bt);
+#else
+ ast_store_lock_info(AST_RDLOCK, filename, line, func, name, t);
+#endif
+ }
+#endif /* DEBUG_THREADS */
+
+ res = pthread_rwlock_tryrdlock(&t->lock);
#ifdef DEBUG_THREADS
if (!res && t->tracking) {
@@ -1379,41 +1497,14 @@
ast_mark_lock_acquired(t);
}
} else if (t->tracking) {
-#ifdef HAVE_BKTR
- if (lt->reentrancy) {
- ast_reentrancy_lock(lt);
- if (!strcmp(filename, "asterisk.c")) {
- __ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
- }
- bt = <->backtrace[lt->reentrancy-1];
- if (!strcmp(filename, "asterisk.c")) {
- __ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
- }
- ast_reentrancy_unlock(lt);
- } else {
- bt = NULL;
- }
- if (t->tracking) {
- ast_remove_lock_info(t, bt);
- }
-#else
- if (t->tracking) {
- ast_remove_lock_info(t);
- }
-#endif
- }
- if (res) {
- __ast_mutex_logger("%s line %d (%s): Error obtaining read lock: %s\n",
- filename, line, func, strerror(res));
- __ast_mutex_logger("Crashing thread %s line %d (%s)\n", filename, line, func);
- DO_THREAD_CRASH;
+ ast_mark_lock_failed(t);
}
#endif /* DEBUG_THREADS */
return res;
}
-int __ast_rwlock_tryrdlock(const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name)
+int __ast_rwlock_trywrlock(const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name)
{
int res;
@@ -1458,14 +1549,14 @@
__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
}
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_RDLOCK, filename, line, func, name, t, bt);
-#else
- ast_store_lock_info(AST_RDLOCK, filename, line, func, name, t);
-#endif
- }
-#endif /* DEBUG_THREADS */
-
- res = pthread_rwlock_tryrdlock(&t->lock);
+ ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t, bt);
+#else
+ ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t);
+#endif
+ }
+#endif /* DEBUG_THREADS */
+
+ res = pthread_rwlock_trywrlock(&t->lock);
#ifdef DEBUG_THREADS
if (!res && t->tracking) {
@@ -1484,88 +1575,6 @@
__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
}
ast_reentrancy_unlock(lt);
- if (t->tracking) {
- ast_mark_lock_acquired(t);
- }
- } else if (t->tracking) {
- ast_mark_lock_failed(t);
- }
-#endif /* DEBUG_THREADS */
-
- return res;
-}
-
-int __ast_rwlock_trywrlock(const char *filename, int line, const char *func, ast_rwlock_t *t, const char *name)
-{
- int res;
-
-#ifdef DEBUG_THREADS
- struct ast_lock_track *lt;
- int canlog = strcmp(filename, "logger.c") & t->tracking;
-#ifdef HAVE_BKTR
- struct ast_bt *bt = NULL;
-#endif
-#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
-
- if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
- /* Don't warn abount uninitialized lock.
- * Simple try to initialize it.
- * May be not needed in linux system.
- */
- res = __ast_rwlock_init(t->tracking, filename, line, func, name, t);
- if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
- __ast_mutex_logger("%s line %d (%s): Error: rwlock '%s' is uninitialized and unable to initialize.\n",
- filename, line, func, name);
- return res;
- }
- }
-#endif /* AST_MUTEX_INIT_W_CONSTRUCTORS */
-
- if (t->tracking && !t->track) {
- ast_reentrancy_init(&t->track);
- }
- lt = t->track;
-
- if (t->tracking) {
-#ifdef HAVE_BKTR
- ast_reentrancy_lock(lt);
- if (!strcmp(filename, "asterisk.c")) {
- __ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
- }
- if (lt->reentrancy != AST_MAX_REENTRANCY) {
- ast_bt_get_addresses(<->backtrace[lt->reentrancy]);
- bt = <->backtrace[lt->reentrancy];
- }
- if (!strcmp(filename, "asterisk.c")) {
- __ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
- }
- ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t, bt);
-#else
- ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t);
-#endif
- }
-#endif /* DEBUG_THREADS */
-
- res = pthread_rwlock_trywrlock(&t->lock);
-
-#ifdef DEBUG_THREADS
- if (!res && t->tracking) {
- ast_reentrancy_lock(lt);
- if (!strcmp(filename, "asterisk.c")) {
- __ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
- }
- if (lt->reentrancy < AST_MAX_REENTRANCY) {
- lt->file[lt->reentrancy] = filename;
- lt->lineno[lt->reentrancy] = line;
- lt->func[lt->reentrancy] = func;
- lt->thread[lt->reentrancy] = pthread_self();
- lt->reentrancy++;
- }
- if (!strcmp(filename, "asterisk.c")) {
- __ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
- }
- ast_reentrancy_unlock(lt);
ast_mark_lock_acquired(t);
} else if (t->tracking) {
ast_mark_lock_failed(t);
More information about the asterisk-commits
mailing list