diff options
| author | 2007-11-25 15:56:16 +0000 | |
|---|---|---|
| committer | 2007-11-25 15:56:16 +0000 | |
| commit | 3802724fba94bd2272defff13235b131ff24ea02 (patch) | |
| tree | 3203c7fa0deaedf81286428de152f524cb0e3d70 /sys/kern/init_main.c | |
| parent | document MBR spoofing, very minimally (diff) | |
| download | wireguard-openbsd-3802724fba94bd2272defff13235b131ff24ea02.tar.xz wireguard-openbsd-3802724fba94bd2272defff13235b131ff24ea02.zip | |
convert crypto thread to workq. add WQ_DIRECTOK flag to workq.
combined, this lets us use crypto before the thread is running
and therefore cryptoraid can attach nice and early.
ok/testing deraadt mbalmer marco
Diffstat (limited to 'sys/kern/init_main.c')
| -rw-r--r-- | sys/kern/init_main.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index fd20f4f24a6..94249f8311d 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.146 2007/10/16 23:41:42 fgsch Exp $ */ +/* $OpenBSD: init_main.c,v 1.147 2007/11/25 15:56:17 tedu Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -136,7 +136,7 @@ void start_init(void *); void start_cleaner(void *); void start_update(void *); void start_reaper(void *); -void start_crypto(void *); +void init_crypto(void); void init_exec(void); void kqueue_init(void); void workq_init(void); @@ -508,8 +508,7 @@ main(void *framep) #ifdef CRYPTO /* Create the crypto kernel thread. */ - if (kthread_create(start_crypto, NULL, NULL, "crypto")) - panic("crypto thread"); + init_crypto(); #endif /* CRYPTO */ microtime(&rtv); @@ -722,12 +721,3 @@ start_reaper(void *arg) reaper(); /* NOTREACHED */ } - -#ifdef CRYPTO -void -start_crypto(void *arg) -{ - crypto_thread(); - /* NOTREACHED */ -} -#endif /* CRYPTO */ |
