diff options
author | Neal H. Walfield <neal@gnu.org> | 2008-10-02 12:00:44 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-04-08 00:03:40 +0200 |
commit | 4ce7b9d66e58f2330f5428e63f70a79a0eb225ec (patch) | |
tree | 92b9c325d9b3fe500dc91baf5c81bd85d1c30441 /sysdeps/generic/pt-mutex-transfer-np.c | |
parent | 67401f7b39a10eb3c4eedabecf180ff587d6c95b (diff) |
2008-10-02 Neal H. Walfield <neal@gnu.org>
* sysdeps/generic/pt-mutex-timedlock.c
(__pthread_mutex_timedlock_internal) [! ALWAYS_TRACK_MUTEX_OWNER]:
Don't update MUTEX->OWNER or assert MUTEX->OWNER for normal
mutexes.
* sysdeps/generic/pt-mutex-unlock.c (__pthread_mutex_unlock)
[! ALWAYS_TRACK_MUTEX_OWNER]: Don't update MUTEX->OWNER or assert
MUTEX->OWNER for normal mutexes.
* sysdeps/generic/pt-mutex-transfer-np.c
(__pthread_mutex_transfer_np) [! ALWAYS_TRACK_MUTEX_OWNER]: Don't
update MUTEX->OWNER for normal mutexes.
Diffstat (limited to 'sysdeps/generic/pt-mutex-transfer-np.c')
-rw-r--r-- | sysdeps/generic/pt-mutex-transfer-np.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/generic/pt-mutex-transfer-np.c b/sysdeps/generic/pt-mutex-transfer-np.c index bcb809dd..7796ac4f 100644 --- a/sysdeps/generic/pt-mutex-transfer-np.c +++ b/sysdeps/generic/pt-mutex-transfer-np.c @@ -45,7 +45,12 @@ __pthread_mutex_transfer_np (struct __pthread_mutex *mutex, pthread_t tid) } #ifndef NDEBUG - mutex->owner = thread; +# if !defined(ALWAYS_TRACK_MUTEX_OWNER) + if (mutex->attr && mutex->attr->mutex_type != PTHREAD_MUTEX_NORMAL) +# endif + { + mutex->owner = thread; + } #endif return 0; |