diff options
author | julian <julian@FreeBSD.org> | 2002-02-07 20:58:47 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-02-07 20:58:47 +0000 |
commit | b5eb64d6f0fccb72419da5552deee22cb6117fac (patch) | |
tree | b267ad497d8d81c2c79c107443dabe850da2126b /sys/vm | |
parent | fce570367d0faf3002916a499e684172e61d8b9b (diff) | |
download | FreeBSD-src-b5eb64d6f0fccb72419da5552deee22cb6117fac.zip FreeBSD-src-b5eb64d6f0fccb72419da5552deee22cb6117fac.tar.gz |
Pre-KSE/M3 commit.
this is a low-functionality change that changes the kernel to access the main
thread of a process via the linked list of threads rather than
assuming that it is embedded in the process. It IS still embeded there
but remove all teh code that assumes that in preparation for the next commit
which will actually move it out.
Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_extern.h | 2 | ||||
-rw-r--r-- | sys/vm/vm_glue.c | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h index 728b5b6..f68aff5 100644 --- a/sys/vm/vm_extern.h +++ b/sys/vm/vm_extern.h @@ -80,7 +80,7 @@ void vm_fault_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t void vm_fault_unwire __P((vm_map_t, vm_offset_t, vm_offset_t)); int vm_fault_wire __P((vm_map_t, vm_offset_t, vm_offset_t)); int vm_fault_user_wire __P((vm_map_t, vm_offset_t, vm_offset_t)); -void vm_forkproc __P((struct thread *, struct proc *, int)); +void vm_forkproc __P((struct thread *, struct proc *, struct thread *, int)); void vm_waitproc __P((struct proc *)); int vm_mmap __P((vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, void *, vm_ooffset_t)); vm_offset_t vm_page_alloc_contig __P((vm_offset_t, vm_offset_t, vm_offset_t, vm_offset_t)); diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index d2ad1e2..ce4a800 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -209,9 +209,10 @@ vsunlock(addr, len) * to user mode to avoid stack copying and relocation problems. */ void -vm_forkproc(td, p2, flags) +vm_forkproc(td, p2, td2, flags) struct thread *td; struct proc *p2; + struct thread *td2; int flags; { struct proc *p1 = td->td_proc; @@ -230,7 +231,7 @@ vm_forkproc(td, p2, flags) vmspace_unshare(p1); } } - cpu_fork(td, p2, flags); + cpu_fork(td, p2, td2, flags); return; } @@ -253,7 +254,7 @@ vm_forkproc(td, p2, flags) } pmap_new_proc(p2); - pmap_new_thread(&p2->p_thread); /* Initial thread */ + pmap_new_thread(td2); /* Initial thread */ /* XXXKSE this is unsatisfactory but should be adequate */ up = p2->p_uarea; @@ -286,7 +287,7 @@ vm_forkproc(td, p2, flags) * cpu_fork will copy and update the pcb, set up the kernel stack, * and make the child ready to run. */ - cpu_fork(td, p2, flags); + cpu_fork(td, p2, td2, flags); } /* |