summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-09-07 18:44:30 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-09-07 18:44:30 +0000
commit5ebd98436ed890ed5e2a60af5b9cafb79a7a82ac (patch)
treeb1e45e8b61f6723c6d896c8d7122f4be9458475f /sys
parente5e5f64dfbc0259927c65ac2ecc1c74b4cbcaeac (diff)
avoid excessive wakeup(). we think this is safe...
Diffstat (limited to 'sys')
-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;
}