diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-04-01 00:27:52 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-04-01 00:27:52 +0000 |
commit | 4de2bb9c879fcc5a75d76dc922018b5b58356023 (patch) | |
tree | a8f4f8f3392d228342a12726981feb34b65ca72e /sys | |
parent | 64ac5f7d501c6b5048f77c35e8c54a950e0b054e (diff) |
init kqueues normally, from pedro martelletto
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/init_main.c | 10 | ||||
-rw-r--r-- | sys/kern/kern_event.c | 11 |
2 files changed, 10 insertions, 11 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index f3fed6fd0ac..f7d1e76fccf 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.112 2004/03/14 23:12:11 tedu Exp $ */ +/* $OpenBSD: init_main.c,v 1.113 2004/04/01 00:27:51 tedu Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -135,8 +135,9 @@ void start_init(void *); void start_cleaner(void *); void start_update(void *); void start_reaper(void *); -void start_crypto(void *); +void start_crypto(void *); void init_exec(void); +void kqueue_init(void); extern char sigcode[], esigcode[]; #ifdef SYSCALL_DEBUG @@ -243,6 +244,11 @@ main(framep) pipe_init(); /* + * Initialize kqueues. + */ + kqueue_init(); + + /* * Create process 0 (the swapper). */ LIST_INSERT_HEAD(&allproc, p, p_list); diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index caedf478e22..9d030f4f269 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_event.c,v 1.22 2004/01/12 04:47:01 tedu Exp $ */ +/* $OpenBSD: kern_event.c,v 1.23 2004/04/01 00:27:51 tedu Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org> @@ -127,20 +127,16 @@ struct filterops *sysfilt_ops[] = { &sig_filtops, /* EVFILT_SIGNAL */ }; -/* XXX - call this on startup instead. */ void kqueue_init(void); -int kqueue_initialized; - void kqueue_init(void) { + pool_init(&kqueue_pool, sizeof(struct kqueue), 0, 0, 0, "kqeuepl", &pool_allocator_nointr); pool_init(&knote_pool, sizeof(struct knote), 0, 0, 0, "knotepl", &pool_allocator_nointr); - - kqueue_initialized = 1; } int @@ -314,9 +310,6 @@ sys_kqueue(struct proc *p, void *v, register_t *retval) struct file *fp; int fd, error; - if (!kqueue_initialized) - kqueue_init(); - error = falloc(p, &fp, &fd); if (error) return (error); |