summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2000-09-07 18:44:29 +0000
committerderaadt <deraadt@openbsd.org>2000-09-07 18:44:29 +0000
commita8502d08b76a3acacbaf000954e442a6eeff0e5c (patch)
treeee51f19264c4c12ada85fdac1515feda958bee75
parentRun powerhooks at splhigh. (diff)
downloadwireguard-openbsd-a8502d08b76a3acacbaf000954e442a6eeff0e5c.tar.xz
wireguard-openbsd-a8502d08b76a3acacbaf000954e442a6eeff0e5c.zip
avoid excessive wakeup(). we think this is safe...
-rw-r--r--sys/crypto/crypto.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/crypto/crypto.c b/sys/crypto/crypto.c
index 69e929313c7..57fa0b3be58 100644
--- a/sys/crypto/crypto.c
+++ b/sys/crypto/crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crypto.c,v 1.13 2000/08/19 13:43:23 nate Exp $ */
+/* $OpenBSD: crypto.c,v 1.14 2000/09/07 18:44:29 deraadt Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
@@ -284,15 +284,15 @@ crypto_dispatch(struct cryptop *crp)
{
int s = splhigh();
- if (crp_req_queue == NULL)
- crp_req_queue = crp;
- else
- *crp_req_queue_tail = crp;
-
- crp_req_queue_tail = &(crp->crp_next);
- wakeup((caddr_t) &crp_req_queue);
+ if (crp_req_queue == NULL) {
+ crp_req_queue = crp;
+ crp_req_queue_tail = &(crp->crp_next);
+ wakeup((caddr_t) &crp_req_queue);
+ } else {
+ *crp_req_queue_tail = crp;
+ crp_req_queue_tail = &(crp->crp_next);
+ }
splx(s);
-
return 0;
}