summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-11-06 13:36:53 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-11-06 13:36:53 +0000
commitdce408d18a14842aa7836a626a151e98665f04e7 (patch)
treea3ddb948fd94211a9af9df05d8de6c60a2081605 /sys/kern
parent789e8c48d1472795faa6a959068b32a1749b315d (diff)
More sync to NetBSD.
- Use malloc/free instead of MALLOC/FREE for variable sized allocations. - Move the memory inheritance code to sys/mman.h and rename from VM_* to MAP_* - various cleanups and simplifications.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/init_main.c13
-rw-r--r--sys/kern/kern_fork.c5
2 files changed, 5 insertions, 13 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 6f671250c98..fcb3083fa05 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.79 2001/10/11 08:07:12 gluk Exp $ */
+/* $OpenBSD: init_main.c,v 1.80 2001/11/06 13:36:52 art Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -132,7 +132,6 @@ struct timeval runtime;
int main __P((void *));
void check_console __P((struct proc *));
void start_init __P((void *));
-void start_pagedaemon __P((void *));
void start_cleaner __P((void *));
void start_update __P((void *));
void start_reaper __P((void *));
@@ -407,7 +406,7 @@ main(framep)
cpu_set_kpc(initproc, start_init, initproc);
/* Create process 2, the pageout daemon kernel thread. */
- if (kthread_create(start_pagedaemon, NULL, NULL, "pagedaemon"))
+ if (kthread_create(uvm_pageout, NULL, NULL, "pagedaemon"))
panic("fork pagedaemon");
/* Create process 3, the reaper daemon kernel thread. */
@@ -604,14 +603,6 @@ start_init(arg)
}
void
-start_pagedaemon(arg)
- void *arg;
-{
- uvm_pageout();
- /* NOTREACHED */
-}
-
-void
start_update(arg)
void *arg;
{
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 38fae5329ea..01393fee290 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.44 2001/10/14 14:39:03 art Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.45 2001/11/06 13:36:52 art Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -58,6 +58,7 @@
#include <sys/sched.h>
#include <dev/rndvar.h>
#include <sys/pool.h>
+#include <sys/mman.h>
#include <sys/syscallargs.h>
@@ -349,7 +350,7 @@ again:
/* share as much address space as possible */
(void) uvm_map_inherit(&p1->p_vmspace->vm_map,
VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS - MAXSSIZ,
- VM_INHERIT_SHARE);
+ MAP_INHERIT_SHARE);
}
p2->p_addr = (struct user *)uaddr;