Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/sys_machdep.c
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | |||||
void | void | ||||
set_fsbase(struct thread *td, uint32_t base) | set_fsbase(struct thread *td, uint32_t base) | ||||
{ | { | ||||
struct segment_descriptor sd; | struct segment_descriptor sd; | ||||
fill_based_sd(&sd, base); | fill_based_sd(&sd, base); | ||||
critical_enter(); | critical_enter(); | ||||
td->td_pcb->pcb_fsd = sd; | td->td_pcb->pcb_fsd = sd; | ||||
if (td == curthread) | |||||
PCPU_GET(fsgs_gdt)[0] = sd; | PCPU_GET(fsgs_gdt)[0] = sd; | ||||
critical_exit(); | critical_exit(); | ||||
} | } | ||||
void | void | ||||
set_gsbase(struct thread *td, uint32_t base) | set_gsbase(struct thread *td, uint32_t base) | ||||
{ | { | ||||
struct segment_descriptor sd; | struct segment_descriptor sd; | ||||
fill_based_sd(&sd, base); | fill_based_sd(&sd, base); | ||||
critical_enter(); | critical_enter(); | ||||
td->td_pcb->pcb_gsd = sd; | td->td_pcb->pcb_gsd = sd; | ||||
if (td == curthread) | |||||
PCPU_GET(fsgs_gdt)[1] = sd; | PCPU_GET(fsgs_gdt)[1] = sd; | ||||
critical_exit(); | critical_exit(); | ||||
} | } | ||||
#ifndef _SYS_SYSPROTO_H_ | #ifndef _SYS_SYSPROTO_H_ | ||||
struct sysarch_args { | struct sysarch_args { | ||||
int op; | int op; | ||||
char *parms; | char *parms; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 678 Lines • Show Last 20 Lines |