summaryrefslogtreecommitdiff
path: root/lib/librthread/rthread_rwlock.c
diff options
context:
space:
mode:
authorMichal Mazurek <akfaew@cvs.openbsd.org>2016-09-03 16:44:21 +0000
committerMichal Mazurek <akfaew@cvs.openbsd.org>2016-09-03 16:44:21 +0000
commit46036a85f87b62d5e1118f617afac606e3bf039c (patch)
tree9eb5c2aeca4f8bd9b76276eeb0581c130abf1d03 /lib/librthread/rthread_rwlock.c
parent64fadef64490c07991c2f27641963bac0db4f7c7 (diff)
Remove _USING_TICKETS, it's defined as 0. No functional change.
ok tedu@ mpi@
Diffstat (limited to 'lib/librthread/rthread_rwlock.c')
-rw-r--r--lib/librthread/rthread_rwlock.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/librthread/rthread_rwlock.c b/lib/librthread/rthread_rwlock.c
index 007196bbbb6..cb424b19a6d 100644
--- a/lib/librthread/rthread_rwlock.c
+++ b/lib/librthread/rthread_rwlock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread_rwlock.c,v 1.6 2016/04/02 19:56:53 guenther Exp $ */
+/* $OpenBSD: rthread_rwlock.c,v 1.7 2016/09/03 16:44:20 akfaew Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* Copyright (c) 2012 Philip Guenther <guenther@openbsd.org>
@@ -117,8 +117,8 @@ _rthread_rwlock_rdlock(pthread_rwlock_t *lockp, const struct timespec *abstime,
error = EDEADLK;
else {
do {
- if (__thrsleep(lock, CLOCK_REALTIME | _USING_TICKETS,
- abstime, &lock->lock.ticket, NULL) == EWOULDBLOCK)
+ if (__thrsleep(lock, CLOCK_REALTIME, abstime,
+ &lock->lock.ticket, NULL) == EWOULDBLOCK)
return (ETIMEDOUT);
_spinlock(&lock->lock);
} while (lock->owner != NULL || !TAILQ_EMPTY(&lock->writers));
@@ -180,8 +180,7 @@ _rthread_rwlock_wrlock(pthread_rwlock_t *lockp, const struct timespec *abstime,
/* gotta block */
TAILQ_INSERT_TAIL(&lock->writers, thread, waiting);
do {
- do_wait = __thrsleep(thread, CLOCK_REALTIME |
- _USING_TICKETS, abstime,
+ do_wait = __thrsleep(thread, CLOCK_REALTIME, abstime,
&lock->lock.ticket, NULL) != EWOULDBLOCK;
_spinlock(&lock->lock);
} while (lock->owner != thread && do_wait);