-/* $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 $ */
/*
#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>
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);
prof_init();
#endif
- mbcpuinit(); /* enable per cpu mbuf data */
+ /* Enable per-CPU data. */
+ mbcpuinit();
+ kqueue_init_percpu();
uvm_init_percpu();
/* init exec and emul */
-/* $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>
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 *);
PR_WAITOK, "knotepl", NULL);
}
+void
+kqueue_init_percpu(void)
+{
+ pool_cache_init(&knote_pool);
+}
+
int
filt_fileattach(struct knote *kn)
{
-/* $OpenBSD: event.h,v 1.54 2021/02/24 14:59:52 visa Exp $ */
+/* $OpenBSD: event.h,v 1.55 2021/06/02 13:56:28 visa Exp $ */
/*-
* Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
extern void knote_processexit(struct proc *);
extern void knote_modify(const struct kevent *, struct knote *);
extern void knote_submit(struct knote *, struct kevent *);
+extern void kqueue_init(void);
+extern void kqueue_init_percpu(void);
extern int kqueue_register(struct kqueue *kq,
struct kevent *kev, struct proc *p);
extern int kqueue_scan(struct kqueue_scan_state *, int, struct kevent *,