diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-03-28 01:39:41 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-03-28 01:39:41 +0200 |
commit | 3849b385c44d8d8a2332c826e18d31cff7327e45 (patch) | |
tree | 7c00561a25e703446598315326a13a3a8b9a01b2 /sysdeps/generic/pt-mutex-timedlock.c | |
parent | 08ed02b9705b7bce1b8d79da6455d59a31295212 (diff) |
Fix coding style
Diffstat (limited to 'sysdeps/generic/pt-mutex-timedlock.c')
-rw-r--r-- | sysdeps/generic/pt-mutex-timedlock.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/generic/pt-mutex-timedlock.c b/sysdeps/generic/pt-mutex-timedlock.c index 992d32e..b23680a 100644 --- a/sysdeps/generic/pt-mutex-timedlock.c +++ b/sysdeps/generic/pt-mutex-timedlock.c @@ -44,17 +44,17 @@ __pthread_mutex_timedlock_internal (struct __pthread_mutex *mutex, /* Successfully acquired the lock. */ { #ifdef ALWAYS_TRACK_MUTEX_OWNER -#ifndef NDEBUG +# ifndef NDEBUG self = _pthread_self (); if (self) /* The main thread may take a lock before the library is fully initialized, in particular, before the main thread has a TCB. */ { - assert (!mutex->__owner); + assert (mutex->__owner == NULL); mutex->__owner = _pthread_self (); } -#endif +# endif #endif if (attr) @@ -82,7 +82,7 @@ __pthread_mutex_timedlock_internal (struct __pthread_mutex *mutex, self = _pthread_self (); assert (self); - if (!attr || attr->__mutex_type == PTHREAD_MUTEX_NORMAL) + if (attr == NULL || attr->__mutex_type == PTHREAD_MUTEX_NORMAL) { #if defined(ALWAYS_TRACK_MUTEX_OWNER) assert (mutex->__owner != self); @@ -136,7 +136,7 @@ __pthread_mutex_timedlock_internal (struct __pthread_mutex *mutex, } __pthread_spin_lock (&mutex->__lock); - if (!self->prevp) + if (self->prevp == NULL) /* Another thread removed us from the queue, which means a wakeup message has been sent. It was either consumed while we were blocking, or queued after we timed out and before we acquired the mutex lock, in |