aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asterisk/lock.h78
1 files changed, 39 insertions, 39 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h
index 33af56405..ae81fe46e 100644
--- a/include/asterisk/lock.h
+++ b/include/asterisk/lock.h
@@ -501,9 +501,9 @@ static inline int __ast_pthread_mutex_lock(const char *filename, int lineno, con
ast_bt_get_addresses(&lt->backtrace[lt->reentrancy]);
bt = &lt->backtrace[lt->reentrancy];
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex, bt);
+ ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t, bt);
#else
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex);
+ ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t);
#endif
}
@@ -565,7 +565,7 @@ static inline int __ast_pthread_mutex_lock(const char *filename, int lineno, con
}
ast_reentrancy_unlock(lt);
if (t->tracking) {
- ast_mark_lock_acquired(&t->mutex);
+ ast_mark_lock_acquired(t);
}
} else {
#ifdef HAVE_BKTR
@@ -577,11 +577,11 @@ static inline int __ast_pthread_mutex_lock(const char *filename, int lineno, con
bt = NULL;
}
if (t->tracking) {
- ast_remove_lock_info(&t->mutex, bt);
+ ast_remove_lock_info(t, bt);
}
#else
if (t->tracking) {
- ast_remove_lock_info(&t->mutex);
+ ast_remove_lock_info(t);
}
#endif
__ast_mutex_logger("%s line %d (%s): Error obtaining mutex: %s\n",
@@ -623,9 +623,9 @@ static inline int __ast_pthread_mutex_trylock(const char *filename, int lineno,
ast_bt_get_addresses(&lt->backtrace[lt->reentrancy]);
bt = &lt->backtrace[lt->reentrancy];
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex, bt);
+ ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t, bt);
#else
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex);
+ ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t);
#endif
}
@@ -643,10 +643,10 @@ static inline int __ast_pthread_mutex_trylock(const char *filename, int lineno,
}
ast_reentrancy_unlock(lt);
if (t->tracking) {
- ast_mark_lock_acquired(&t->mutex);
+ ast_mark_lock_acquired(t);
}
} else if (t->tracking) {
- ast_mark_lock_failed(&t->mutex);
+ ast_mark_lock_failed(t);
}
return res;
@@ -709,9 +709,9 @@ static inline int __ast_pthread_mutex_unlock(const char *filename, int lineno, c
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_remove_lock_info(&t->mutex, bt);
+ ast_remove_lock_info(t, bt);
#else
- ast_remove_lock_info(&t->mutex);
+ ast_remove_lock_info(t);
#endif
}
@@ -806,9 +806,9 @@ static inline int __ast_cond_wait(const char *filename, int lineno, const char *
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_remove_lock_info(&t->mutex, bt);
+ ast_remove_lock_info(t, bt);
#else
- ast_remove_lock_info(&t->mutex);
+ ast_remove_lock_info(t);
#endif
}
@@ -836,9 +836,9 @@ static inline int __ast_cond_wait(const char *filename, int lineno, const char *
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex, bt);
+ ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t, bt);
#else
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex);
+ ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t);
#endif
}
}
@@ -903,9 +903,9 @@ static inline int __ast_cond_timedwait(const char *filename, int lineno, const c
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_remove_lock_info(&t->mutex, bt);
+ ast_remove_lock_info(t, bt);
#else
- ast_remove_lock_info(&t->mutex);
+ ast_remove_lock_info(t);
#endif
}
@@ -933,9 +933,9 @@ static inline int __ast_cond_timedwait(const char *filename, int lineno, const c
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex, bt);
+ ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t, bt);
#else
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex);
+ ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t);
#endif
}
}
@@ -1115,9 +1115,9 @@ static inline int _ast_rwlock_unlock(ast_rwlock_t *t, const char *name,
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_remove_lock_info(&t->lock, bt);
+ ast_remove_lock_info(t, bt);
#else
- ast_remove_lock_info(&t->lock);
+ ast_remove_lock_info(t);
#endif
}
@@ -1161,9 +1161,9 @@ static inline int _ast_rwlock_rdlock(ast_rwlock_t *t, const char *name,
ast_bt_get_addresses(&lt->backtrace[lt->reentrancy]);
bt = &lt->backtrace[lt->reentrancy];
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_RDLOCK, filename, line, func, name, &t->lock, bt);
+ ast_store_lock_info(AST_RDLOCK, filename, line, func, name, t, bt);
#else
- ast_store_lock_info(AST_RDLOCK, filename, line, func, name, &t->lock);
+ ast_store_lock_info(AST_RDLOCK, filename, line, func, name, t);
#endif
}
@@ -1213,7 +1213,7 @@ static inline int _ast_rwlock_rdlock(ast_rwlock_t *t, const char *name,
}
ast_reentrancy_unlock(lt);
if (t->tracking) {
- ast_mark_lock_acquired(&t->lock);
+ ast_mark_lock_acquired(t);
}
} else {
#ifdef HAVE_BKTR
@@ -1225,11 +1225,11 @@ static inline int _ast_rwlock_rdlock(ast_rwlock_t *t, const char *name,
bt = NULL;
}
if (t->tracking) {
- ast_remove_lock_info(&t->lock, bt);
+ ast_remove_lock_info(t, bt);
}
#else
if (t->tracking) {
- ast_remove_lock_info(&t->lock);
+ ast_remove_lock_info(t);
}
#endif
__ast_mutex_logger("%s line %d (%s): Error obtaining read lock: %s\n",
@@ -1270,9 +1270,9 @@ static inline int _ast_rwlock_wrlock(ast_rwlock_t *t, const char *name,
ast_bt_get_addresses(&lt->backtrace[lt->reentrancy]);
bt = &lt->backtrace[lt->reentrancy];
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_WRLOCK, filename, line, func, name, &t->lock, bt);
+ ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t, bt);
#else
- ast_store_lock_info(AST_WRLOCK, filename, line, func, name, &t->lock);
+ ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t);
#endif
}
#ifdef DETECT_DEADLOCKS
@@ -1321,7 +1321,7 @@ static inline int _ast_rwlock_wrlock(ast_rwlock_t *t, const char *name,
}
ast_reentrancy_unlock(lt);
if (t->tracking) {
- ast_mark_lock_acquired(&t->lock);
+ ast_mark_lock_acquired(t);
}
} else {
#ifdef HAVE_BKTR
@@ -1332,11 +1332,11 @@ static inline int _ast_rwlock_wrlock(ast_rwlock_t *t, const char *name,
bt = NULL;
}
if (t->tracking) {
- ast_remove_lock_info(&t->lock, bt);
+ ast_remove_lock_info(t, bt);
}
#else
if (t->tracking) {
- ast_remove_lock_info(&t->lock);
+ ast_remove_lock_info(t);
}
#endif
__ast_mutex_logger("%s line %d (%s): Error obtaining write lock: %s\n",
@@ -1378,9 +1378,9 @@ static inline int _ast_rwlock_tryrdlock(ast_rwlock_t *t, const char *name,
ast_bt_get_addresses(&lt->backtrace[lt->reentrancy]);
bt = &lt->backtrace[lt->reentrancy];
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_RDLOCK, filename, line, func, name, &t->lock, bt);
+ ast_store_lock_info(AST_RDLOCK, filename, line, func, name, t, bt);
#else
- ast_store_lock_info(AST_RDLOCK, filename, line, func, name, &t->lock);
+ ast_store_lock_info(AST_RDLOCK, filename, line, func, name, t);
#endif
}
@@ -1398,10 +1398,10 @@ static inline int _ast_rwlock_tryrdlock(ast_rwlock_t *t, const char *name,
}
ast_reentrancy_unlock(lt);
if (t->tracking) {
- ast_mark_lock_acquired(&t->lock);
+ ast_mark_lock_acquired(t);
}
} else if (t->tracking) {
- ast_mark_lock_failed(&t->lock);
+ ast_mark_lock_failed(t);
}
return res;
}
@@ -1438,9 +1438,9 @@ static inline int _ast_rwlock_trywrlock(ast_rwlock_t *t, const char *name,
ast_bt_get_addresses(&lt->backtrace[lt->reentrancy]);
bt = &lt->backtrace[lt->reentrancy];
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_WRLOCK, filename, line, func, name, &t->lock, bt);
+ ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t, bt);
#else
- ast_store_lock_info(AST_WRLOCK, filename, line, func, name, &t->lock);
+ ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t);
#endif
}
@@ -1458,10 +1458,10 @@ static inline int _ast_rwlock_trywrlock(ast_rwlock_t *t, const char *name,
}
ast_reentrancy_unlock(lt);
if (t->tracking) {
- ast_mark_lock_acquired(&t->lock);
+ ast_mark_lock_acquired(t);
}
} else if (t->tracking) {
- ast_mark_lock_failed(&t->lock);
+ ast_mark_lock_failed(t);
}
return res;
}