X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fthreads.h;h=85aaced7ecc843f5cdf0b2c998660ab22a979139;hp=d55e59ed9eb3f7c15051b470b284fb36dca6bd12;hb=6834b882015a9323672e9fce8811aa4283f196f0;hpb=95d8811c2cef8bcde78e1f172f6c57c25cd487aa diff --git a/src/threads.h b/src/threads.h index d55e59ed..85aaced7 100644 --- a/src/threads.h +++ b/src/threads.h @@ -38,6 +38,10 @@ static inline void thread_destroy(thread_t *tid) { static inline void mutex_create(mutex_t *mutex) { pthread_mutex_init(mutex, NULL); } +#if 1 +#define mutex_lock(m) logger(LOG_DEBUG, "mutex_lock() at " __FILE__ " line %d", __LINE__); pthread_mutex_lock(m) +#define mutex_unlock(m) logger(LOG_DEBUG, "mutex_unlock() at " __FILE__ " line %d", __LINE__); pthread_mutex_unlock(m) +#else static inline void mutex_lock(mutex_t *mutex) { pthread_mutex_lock(mutex); } @@ -45,5 +49,6 @@ static inline void mutex_unlock(mutex_t *mutex) { pthread_mutex_unlock(mutex); } #endif +#endif #endif