diff options
Diffstat (limited to 'sys/crypto/crypto.c')
-rw-r--r-- | sys/crypto/crypto.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/sys/crypto/crypto.c b/sys/crypto/crypto.c index e964768b6dc..f30bf32f6b9 100644 --- a/sys/crypto/crypto.c +++ b/sys/crypto/crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto.c,v 1.57 2010/08/08 04:10:49 jsing Exp $ */ +/* $OpenBSD: crypto.c,v 1.58 2010/09/08 14:15:56 jsing Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -28,14 +28,13 @@ #include <crypto/cryptodev.h> -void init_crypto(void); +void crypto_init(void); struct cryptocap *crypto_drivers = NULL; int crypto_drivers_num = 0; struct pool cryptop_pool; struct pool cryptodesc_pool; -int crypto_pool_initialized = 0; struct workq *crypto_workq; @@ -593,14 +592,6 @@ crypto_getreq(int num) s = splvm(); - if (crypto_pool_initialized == 0) { - pool_init(&cryptop_pool, sizeof(struct cryptop), 0, 0, - 0, "cryptop", NULL); - pool_init(&cryptodesc_pool, sizeof(struct cryptodesc), 0, 0, - 0, "cryptodesc", NULL); - crypto_pool_initialized = 1; - } - crp = pool_get(&cryptop_pool, PR_NOWAIT); if (crp == NULL) { splx(s); @@ -626,9 +617,14 @@ crypto_getreq(int num) } void -init_crypto() +crypto_init(void) { crypto_workq = workq_create("crypto", 1, IPL_HIGH); + + pool_init(&cryptop_pool, sizeof(struct cryptop), 0, 0, + 0, "cryptop", NULL); + pool_init(&cryptodesc_pool, sizeof(struct cryptodesc), 0, 0, + 0, "cryptodesc", NULL); } /* |