diff options
Diffstat (limited to 'sysdeps/generic/pt-mutex-unlock.c')
-rw-r--r-- | sysdeps/generic/pt-mutex-unlock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/generic/pt-mutex-unlock.c b/sysdeps/generic/pt-mutex-unlock.c index a9872252..492dfcb5 100644 --- a/sysdeps/generic/pt-mutex-unlock.c +++ b/sysdeps/generic/pt-mutex-unlock.c @@ -78,6 +78,10 @@ __pthread_mutex_unlock (pthread_mutex_t *mutex) wakeup = mutex->__queue; __pthread_dequeue (wakeup); +#ifndef NDEBUG + mutex->owner = wakeup; +#endif + /* We do not unlock MUTEX->held: we are transferring the ownership to the thread that we are waking up. */ |