In cpu_set_user_tls(), consistently set PCB_FULL_IRET pcb flag for

both 64bit and 32bit binaries, not for 64bit only.

The set of the flag is not neccessary there, because the only current
user of the cpu_set_user_tls() is create_thread(), which calls
cpu_set_upcall() before and cpu_set_upcall() itself sets PCB_FULL_IRET.
Change the function for consistency and preserve existing KPI for now.

MFC after:	1 week
This commit is contained in:
kib 2012-02-10 21:26:25 +00:00
parent 4119b9cf7a
commit d34d9917c8

View File

@ -552,6 +552,7 @@ cpu_set_user_tls(struct thread *td, void *tls_base)
return (EINVAL);
pcb = td->td_pcb;
set_pcb_flags(pcb, PCB_FULL_IRET);
#ifdef COMPAT_FREEBSD32
if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) {
pcb->pcb_gsbase = (register_t)tls_base;
@ -559,7 +560,6 @@ cpu_set_user_tls(struct thread *td, void *tls_base)
}
#endif
pcb->pcb_fsbase = (register_t)tls_base;
set_pcb_flags(pcb, PCB_FULL_IRET);
return (0);
}