diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2004-03-25 03:39:38 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2004-03-25 03:39:38 +0000 |
| commit | fc900bcdd2430b9613d9b809e37662a76fa30332 (patch) | |
| tree | 38966e21e4c48837c78a9666fc3edf03b3bed54f /sys | |
| parent | 946a5e675d13ef1da6f428d9161c9ddb3c62905c (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 215c8252bb7a..77b5095708e9 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -124,7 +124,8 @@ cpu_fork(td1, p2, td2, flags) fpuexit(td1); /* Point the pcb to the top of the stack */ - pcb2 = (struct pcb *)(td2->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; + pcb2 = (struct pcb *)(td2->td_kstack + + td2->td_kstack_pages * PAGE_SIZE) - 1; td2->td_pcb = pcb2; /* Copy p1's pcb */ @@ -247,8 +248,8 @@ void cpu_thread_setup(struct thread *td) { - td->td_pcb = - (struct pcb *)(td->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; + td->td_pcb = (struct pcb *)(td->td_kstack + + td->td_kstack_pages * PAGE_SIZE) - 1; td->td_frame = (struct trapframe *)td->td_pcb - 1; } |
