summaryrefslogtreecommitdiff
path: root/sysdeps/generic/pt-rwlock-timedrdlock.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-03-28 01:19:22 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-03-28 01:19:22 +0200
commit4b90d3f6146154638ffbe227da48e9af0dd2a803 (patch)
tree7e034f416b4b7e95a76b99418df21e64e795e22a /sysdeps/generic/pt-rwlock-timedrdlock.c
parentb1f57fa0cf5515263bebcefe1044995ebaf9a1f3 (diff)
Fix coding style
Diffstat (limited to 'sysdeps/generic/pt-rwlock-timedrdlock.c')
-rw-r--r--sysdeps/generic/pt-rwlock-timedrdlock.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sysdeps/generic/pt-rwlock-timedrdlock.c b/sysdeps/generic/pt-rwlock-timedrdlock.c
index db44000..fe0c224 100644
--- a/sysdeps/generic/pt-rwlock-timedrdlock.c
+++ b/sysdeps/generic/pt-rwlock-timedrdlock.c
@@ -46,14 +46,14 @@ __pthread_rwlock_timedrdlock_internal (struct __pthread_rwlock *rwlock,
}
else
/* Lock is held, but is held by a reader? */
- if (rwlock->__readers > 0)
- /* Just add ourself to number of readers. */
- {
- assert (rwlock->__readerqueue == 0);
- rwlock->__readers ++;
- __pthread_spin_unlock (&rwlock->__lock);
- return 0;
- }
+ if (rwlock->__readers > 0)
+ /* Just add ourself to number of readers. */
+ {
+ assert (rwlock->__readerqueue == 0);
+ rwlock->__readers++;
+ __pthread_spin_unlock (&rwlock->__lock);
+ return 0;
+ }
/* The lock is busy. */
@@ -79,7 +79,7 @@ __pthread_rwlock_timedrdlock_internal (struct __pthread_rwlock *rwlock,
}
__pthread_spin_lock (&rwlock->__lock);
- if (! self->prevp)
+ if (!self->prevp)
/* 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 rwlock lock, in
@@ -88,7 +88,7 @@ __pthread_rwlock_timedrdlock_internal (struct __pthread_rwlock *rwlock,
else
{
/* We're still in the queue. Noone attempted to wake us up, i.e. we
- timed out. */
+ timed out. */
__pthread_dequeue (self);
drain = 0;
}
@@ -113,7 +113,7 @@ __pthread_rwlock_timedrdlock_internal (struct __pthread_rwlock *rwlock,
int
__pthread_rwlock_timedrdlock (struct __pthread_rwlock *rwlock,
- const struct timespec *abstime)
+ const struct timespec *abstime)
{
return __pthread_rwlock_timedrdlock_internal (rwlock, abstime);
}