diff options
author | 2016-09-03 16:44:20 +0000 | |
---|---|---|
committer | 2016-09-03 16:44:20 +0000 | |
commit | 4a529ace46435d50395a71136a1de0cda65ca96f (patch) | |
tree | 34c3feb3bc9681d0aac6de7bd183f462cf57df0f /lib/librthread/rthread_sync.c | |
parent | Add functions for SHA512/256. The standard says you're supposed to start (diff) | |
download | wireguard-openbsd-4a529ace46435d50395a71136a1de0cda65ca96f.tar.xz wireguard-openbsd-4a529ace46435d50395a71136a1de0cda65ca96f.zip |
Remove _USING_TICKETS, it's defined as 0. No functional change.
ok tedu@ mpi@
Diffstat (limited to 'lib/librthread/rthread_sync.c')
-rw-r--r-- | lib/librthread/rthread_sync.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/librthread/rthread_sync.c b/lib/librthread/rthread_sync.c index 7deb9fbea1a..7abf0709d1f 100644 --- a/lib/librthread/rthread_sync.c +++ b/lib/librthread/rthread_sync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_sync.c,v 1.42 2016/05/07 19:05:22 guenther Exp $ */ +/* $OpenBSD: rthread_sync.c,v 1.43 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> @@ -130,8 +130,7 @@ _rthread_mutex_lock(pthread_mutex_t *mutexp, int trywait, abort(); /* self-deadlock, possibly until timeout */ - while (__thrsleep(self, CLOCK_REALTIME | - _USING_TICKETS, abstime, + while (__thrsleep(self, CLOCK_REALTIME, abstime, &mutex->lock.ticket, NULL) != EWOULDBLOCK) _spinlock(&mutex->lock); return (ETIMEDOUT); @@ -148,8 +147,8 @@ _rthread_mutex_lock(pthread_mutex_t *mutexp, int trywait, /* add to the wait queue and block until at the head */ TAILQ_INSERT_TAIL(&mutex->lockers, self, waiting); while (mutex->owner != self) { - ret = __thrsleep(self, CLOCK_REALTIME | _USING_TICKETS, - abstime, &mutex->lock.ticket, NULL); + ret = __thrsleep(self, CLOCK_REALTIME, abstime, + &mutex->lock.ticket, NULL); _spinlock(&mutex->lock); assert(mutex->owner != NULL); if (ret == EWOULDBLOCK) { @@ -360,7 +359,7 @@ pthread_cond_timedwait(pthread_cond_t *condp, pthread_mutex_t *mutexp, /* wait until we're the owner of the mutex again */ while (mutex->owner != self) { - error = __thrsleep(self, cond->clock | _USING_TICKETS, abstime, + error = __thrsleep(self, cond->clock, abstime, &mutex->lock.ticket, &self->delayed_cancel); /* @@ -510,8 +509,8 @@ pthread_cond_wait(pthread_cond_t *condp, pthread_mutex_t *mutexp) /* wait until we're the owner of the mutex again */ while (mutex->owner != self) { - error = __thrsleep(self, 0 | _USING_TICKETS, NULL, - &mutex->lock.ticket, &self->delayed_cancel); + error = __thrsleep(self, 0, NULL, &mutex->lock.ticket, + &self->delayed_cancel); /* * If we took a normal signal (not from |