diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-09-03 22:39:51 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-09-03 22:39:51 +0200 |
commit | 5d2cf1ea07ecd65f4c276e5b3cbd9e062d9361cf (patch) | |
tree | 2e44e22394ba80aa7a9ce6f8119726626ea9ea8c /libthreads | |
parent | ec61e75b5228b941b62110752c57a145a42e8214 (diff) |
Enable debugging in mutex_try_lock too
* libthreads/cthreads.h (mutex_try_lock): Call WAIT_SET_DEBUG when
spin_try_lock succeeds.
Diffstat (limited to 'libthreads')
-rw-r--r-- | libthreads/cthreads.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libthreads/cthreads.h b/libthreads/cthreads.h index 2c35e700..d937dcca 100644 --- a/libthreads/cthreads.h +++ b/libthreads/cthreads.h @@ -419,7 +419,7 @@ typedef struct mutex { #define mutex_clear(m) mutex_init(m) #define mutex_free(m) free((m)) -#define mutex_try_lock(m) spin_try_lock(&(m)->held) +#define mutex_try_lock(m) (spin_try_lock(&(m)->held) ? WAIT_SET_DEBUG(m), 1 : 0) #define mutex_lock(m) \ MACRO_BEGIN \ if (!spin_try_lock(&(m)->held)) { \ |