diff options
author | peter <peter@FreeBSD.org> | 1996-02-23 18:49:25 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-02-23 18:49:25 +0000 |
commit | 5239b23b5dd3a758a93e0c2186e188e829e7ba19 (patch) | |
tree | 8062bc6b4973f0a1762ce55c879b8c3019d7662e /sys/vm/vm_glue.c | |
parent | 834adf89dc86160b3de01b8991acc8ec96028a47 (diff) | |
download | FreeBSD-src-5239b23b5dd3a758a93e0c2186e188e829e7ba19.zip FreeBSD-src-5239b23b5dd3a758a93e0c2186e188e829e7ba19.tar.gz |
kern_descrip.c: add fdshare()/fdcopy()
kern_fork.c: add the tiny bit of code for rfork operation.
kern/sysv_*: shmfork() takes one less arg, it was never used.
sys/shm.h: drop "isvfork" arg from shmfork() prototype
sys/param.h: declare rfork args.. (this is where OpenBSD put it..)
sys/filedesc.h: protos for fdshare/fdcopy.
vm/vm_mmap.c: add minherit code, add rounding to mmap() type args where
it makes sense.
vm/*: drop unused isvfork arg.
Note: this rfork() implementation copies the address space mappings,
it does not connect the mappings together. ie: once the two processes
have split, the pages may be shared, but the address space is not. If one
does a mmap() etc, it does not appear in the other. This makes it not
useful for pthreads, but it is useful in it's own right for having
light-weight threads in a static shared address space.
Obtained from: Original by Ron Minnich, extended by OpenBSD
Diffstat (limited to 'sys/vm/vm_glue.c')
-rw-r--r-- | sys/vm/vm_glue.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 1d45e37..3dfa281 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -59,10 +59,9 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_glue.c,v 1.38 1996/01/29 12:10:30 davidg Exp $ + * $Id: vm_glue.c,v 1.39 1996/02/22 10:57:36 davidg Exp $ */ -#include "opt_sysvipc.h" #include "opt_ddb.h" #include <sys/param.h> @@ -210,9 +209,8 @@ vsunlock(addr, len, dirtied) * after cpu_fork returns. */ int -vm_fork(p1, p2, isvfork) +vm_fork(p1, p2) register struct proc *p1, *p2; - int isvfork; { register struct user *up; vm_offset_t addr, ptaddr, ptpa; @@ -234,10 +232,8 @@ vm_fork(p1, p2, isvfork) UPT_MIN_ADDRESS - UPAGES * PAGE_SIZE, VM_MAX_ADDRESS, VM_INHERIT_NONE); p2->p_vmspace = vmspace_fork(p1->p_vmspace); -#ifdef SYSVSHM if (p1->p_vmspace->vm_shm) - shmfork(p1, p2, isvfork); -#endif + shmfork(p1, p2); /* * Allocate a wired-down (for now) pcb and kernel stack for the |