diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/init_main.c | 8 | ||||
-rw-r--r-- | sys/kern/kern_event.c | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 7902f2ea0b6..89d6b9dc577 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.306 2021/02/08 10:51:01 mpi Exp $ */ +/* $OpenBSD: init_main.c,v 1.307 2021/06/02 13:56:28 visa Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -71,6 +71,7 @@ #include <sys/msg.h> #endif #include <sys/domain.h> +#include <sys/event.h> #include <sys/msgbuf.h> #include <sys/mbuf.h> #include <sys/pipe.h> @@ -148,7 +149,6 @@ void crypto_init(void); void db_ctf_init(void); void prof_init(void); void init_exec(void); -void kqueue_init(void); void futex_init(void); void taskq_init(void); void timeout_proc_init(void); @@ -432,7 +432,9 @@ main(void *framep) prof_init(); #endif - mbcpuinit(); /* enable per cpu mbuf data */ + /* Enable per-CPU data. */ + mbcpuinit(); + kqueue_init_percpu(); uvm_init_percpu(); /* init exec and emul */ diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 7f821a67ed7..9884b55d5ad 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_event.c,v 1.163 2021/04/22 15:30:12 visa Exp $ */ +/* $OpenBSD: kern_event.c,v 1.164 2021/06/02 13:56:28 visa Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org> @@ -70,7 +70,6 @@ struct kqueue *kqueue_alloc(struct filedesc *); void kqueue_terminate(struct proc *p, struct kqueue *); -void kqueue_init(void); void KQREF(struct kqueue *); void KQRELE(struct kqueue *); @@ -231,6 +230,12 @@ kqueue_init(void) PR_WAITOK, "knotepl", NULL); } +void +kqueue_init_percpu(void) +{ + pool_cache_init(&knote_pool); +} + int filt_fileattach(struct knote *kn) { |