From a91e7a7c6dfb51709e0e2661b7bc7cd0a88a68e4 Mon Sep 17 00:00:00 2001 From: thorpej Date: Sat, 12 Aug 2000 22:41:53 +0000 Subject: [PATCH] Don't bother with a trampoline to start the pagedaemon and reaper threads. --- sys/kern/init_main.c | 26 +++----------------------- sys/kern/kern_exit.c | 4 ++-- sys/sys/proc.h | 4 ++-- sys/uvm/uvm_extern.h | 4 ++-- sys/uvm/uvm_pdaemon.c | 4 ++-- 5 files changed, 11 insertions(+), 31 deletions(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index e77eed3c76aa..9e11538c4c7b 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.176 2000/07/14 07:21:21 thorpej Exp $ */ +/* $NetBSD: init_main.c,v 1.177 2000/08/12 22:41:55 thorpej Exp $ */ /* * Copyright (c) 1995 Christopher G. Demetriou. All rights reserved. @@ -142,8 +142,6 @@ __volatile int start_init_exec; /* semaphore for start_init() */ static void check_console(struct proc *p); static void start_init(void *); -static void start_pagedaemon(void *); -static void start_reaper(void *); void main(void); extern char sigcode[], esigcode[]; @@ -482,11 +480,11 @@ main(void) /* Create the pageout daemon kernel thread. */ uvm_swap_init(); - if (kthread_create1(start_pagedaemon, NULL, NULL, "pagedaemon")) + if (kthread_create1(uvm_pageout, NULL, NULL, "pagedaemon")) panic("fork pagedaemon"); /* Create the process reaper kernel thread. */ - if (kthread_create1(start_reaper, NULL, NULL, "reaper")) + if (kthread_create1(reaper, NULL, NULL, "reaper")) panic("fork reaper"); /* Create the filesystem syncer kernel thread. */ @@ -676,21 +674,3 @@ start_init(void *arg) printf("init: not found\n"); panic("no init"); } - -/* ARGSUSED */ -static void -start_pagedaemon(void *arg) -{ - - uvm_pageout(); - /* NOTREACHED */ -} - -/* ARGSUSED */ -static void -start_reaper(void *arg) -{ - - reaper(); - /* NOTREACHED */ -} diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 2b3c03ea726b..1de1411a9a21 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exit.c,v 1.83 2000/08/12 22:26:01 thorpej Exp $ */ +/* $NetBSD: kern_exit.c,v 1.84 2000/08/12 22:41:55 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -361,7 +361,7 @@ exit2(struct proc *p) * a zombie, and the parent is allowed to read the undead's status. */ void -reaper(void) +reaper(void *arg) { struct proc *p; diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 4862461cdba3..83912b721c44 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.100 2000/08/12 16:38:43 sommerfeld Exp $ */ +/* $NetBSD: proc.h,v 1.101 2000/08/12 22:41:53 thorpej Exp $ */ /*- * Copyright (c) 1986, 1989, 1991, 1993 @@ -393,7 +393,7 @@ int ltsleep __P((void *chan, int pri, const char *wmesg, int timo, void unsleep __P((struct proc *)); void wakeup __P((void *chan)); void wakeup_one __P((void *chan)); -void reaper __P((void)); +void reaper __P((void *)); void exit1 __P((struct proc *, int)); void exit2 __P((struct proc *)); int fork1 __P((struct proc *, int, int, void *, size_t, diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h index f215c4522b39..ef39051ee404 100644 --- a/sys/uvm/uvm_extern.h +++ b/sys/uvm/uvm_extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_extern.h,v 1.47 2000/08/01 00:53:09 wiz Exp $ */ +/* $NetBSD: uvm_extern.h,v 1.48 2000/08/12 22:41:55 thorpej Exp $ */ /* * @@ -507,7 +507,7 @@ void uvm_page_physload __P((paddr_t, paddr_t, void uvm_setpagesize __P((void)); /* uvm_pdaemon.c */ -void uvm_pageout __P((void)); +void uvm_pageout __P((void *)); /* uvm_pglist.c */ int uvm_pglistalloc __P((psize_t, paddr_t, diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c index 119271f7bc3e..831ec980e983 100644 --- a/sys/uvm/uvm_pdaemon.c +++ b/sys/uvm/uvm_pdaemon.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pdaemon.c,v 1.21 2000/06/27 17:29:33 mrg Exp $ */ +/* $NetBSD: uvm_pdaemon.c,v 1.22 2000/08/12 22:41:55 thorpej Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -187,7 +187,7 @@ uvmpd_tune() */ void -uvm_pageout() +uvm_pageout(void *arg) { int npages = 0; int s;