1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Copy %gs from current CPU not from a stale PCB backup.

This commit is contained in:
David Xu 2003-04-11 14:47:34 +00:00
parent d8c586e73a
commit 2257a44ffd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113364
2 changed files with 4 additions and 0 deletions

View File

@ -182,6 +182,7 @@ cpu_fork(td1, p2, td2, flags)
pcb2->pcb_ebx = (int)td2; /* fork_trampoline argument */
pcb2->pcb_eip = (int)fork_trampoline;
pcb2->pcb_psl = td2->td_frame->tf_eflags & ~PSL_I; /* ints disabled */
pcb2->pcb_gs = rgs();
/*-
* pcb2->pcb_dr*: cloned above.
* pcb2->pcb_savefpu: cloned above.
@ -358,6 +359,7 @@ cpu_set_upcall(struct thread *td, void *pcb)
pcb2->pcb_ebx = (int)td; /* trampoline arg */
pcb2->pcb_eip = (int)fork_trampoline;
pcb2->pcb_psl &= ~(PSL_I); /* interrupts must be disabled */
pcb2->pcb_gs = rgs();
/*
* If we didn't copy the pcb, we'd need to do the following registers:
* pcb2->pcb_dr*: cloned above.

View File

@ -182,6 +182,7 @@ cpu_fork(td1, p2, td2, flags)
pcb2->pcb_ebx = (int)td2; /* fork_trampoline argument */
pcb2->pcb_eip = (int)fork_trampoline;
pcb2->pcb_psl = td2->td_frame->tf_eflags & ~PSL_I; /* ints disabled */
pcb2->pcb_gs = rgs();
/*-
* pcb2->pcb_dr*: cloned above.
* pcb2->pcb_savefpu: cloned above.
@ -358,6 +359,7 @@ cpu_set_upcall(struct thread *td, void *pcb)
pcb2->pcb_ebx = (int)td; /* trampoline arg */
pcb2->pcb_eip = (int)fork_trampoline;
pcb2->pcb_psl &= ~(PSL_I); /* interrupts must be disabled */
pcb2->pcb_gs = rgs();
/*
* If we didn't copy the pcb, we'd need to do the following registers:
* pcb2->pcb_dr*: cloned above.