diff options
author | 2001-09-04 23:28:31 +0000 | |
---|---|---|
committer | 2001-09-04 23:28:31 +0000 | |
commit | 1f62ecca865a075093fc1dc63e19ec6e4be6a82c (patch) | |
tree | ab36db668e57234e74c6b276f4d3545ea523607e /lib/libc_r/uthread/uthread_priority_queue.c | |
parent | Wall's -g flag has been broken since it was added. We fix it by (diff) | |
download | wireguard-openbsd-1f62ecca865a075093fc1dc63e19ec6e4be6a82c.tar.xz wireguard-openbsd-1f62ecca865a075093fc1dc63e19ec6e4be6a82c.zip |
Use _waitq_remove() and _waitq_insert() always; from FreeBSD.
Diffstat (limited to 'lib/libc_r/uthread/uthread_priority_queue.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_priority_queue.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/libc_r/uthread/uthread_priority_queue.c b/lib/libc_r/uthread/uthread_priority_queue.c index bb40d6fd934..918ff694aec 100644 --- a/lib/libc_r/uthread/uthread_priority_queue.c +++ b/lib/libc_r/uthread/uthread_priority_queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_priority_queue.c,v 1.3 2000/01/06 07:20:23 d Exp $ */ +/* $OpenBSD: uthread_priority_queue.c,v 1.4 2001/09/04 23:28:31 fgsch Exp $ */ /* * Copyright (c) 1998 Daniel Eischen <eischen@vigrid.com>. * All rights reserved. @@ -67,7 +67,7 @@ static int _pq_active = 0; PANIC(msg); \ } while (0) #define _PQ_ASSERT_NOT_QUEUED(thrd, msg) do { \ - if ((thrd)->flags & _PQ_IN_SCHEDQ) \ + if (((thrd)->flags & _PQ_IN_SCHEDQ) != 0) \ PANIC(msg); \ } while (0) @@ -80,11 +80,9 @@ static int _pq_active = 0; #define _PQ_ASSERT_IN_WAITQ(thrd, msg) #define _PQ_ASSERT_IN_PRIOQ(thrd, msg) #define _PQ_ASSERT_NOT_QUEUED(thrd, msg) -#define _PQ_CHECK_PRIO() #endif - int _pq_alloc(pq_queue_t *pq, int minprio, int maxprio) { @@ -102,9 +100,7 @@ _pq_alloc(pq_queue_t *pq, int minprio, int maxprio) else { /* Remember the queue size: */ pq->pq_size = prioslots; - ret = _pq_init(pq); - } return (ret); } @@ -271,7 +267,6 @@ pq_insert_prio_list(pq_queue_t *pq, int prio) pq->pq_lists[prio].pl_queued = 1; } -#if defined(_PTHREADS_INVARIANTS) void _waitq_insert(pthread_t pthread) { @@ -333,4 +328,3 @@ _waitq_clearactive(void) _PQ_CLEAR_ACTIVE(); } #endif -#endif |