sys_machdep.c (ed83a56181ae1994e038e75b086e4a193e8419e5) sys_machdep.c (c7b021352332a2f79907d68f971849f74b73e1c6)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 94 unchanged lines hidden (view full) ---

103void
104set_fsbase(struct thread *td, uint32_t base)
105{
106 struct segment_descriptor sd;
107
108 fill_based_sd(&sd, base);
109 critical_enter();
110 td->td_pcb->pcb_fsd = sd;
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 94 unchanged lines hidden (view full) ---

103void
104set_fsbase(struct thread *td, uint32_t base)
105{
106 struct segment_descriptor sd;
107
108 fill_based_sd(&sd, base);
109 critical_enter();
110 td->td_pcb->pcb_fsd = sd;
111 PCPU_GET(fsgs_gdt)[0] = sd;
111 if (td == curthread)
112 PCPU_GET(fsgs_gdt)[0] = sd;
112 critical_exit();
113}
114
115void
116set_gsbase(struct thread *td, uint32_t base)
117{
118 struct segment_descriptor sd;
119
120 fill_based_sd(&sd, base);
121 critical_enter();
122 td->td_pcb->pcb_gsd = sd;
113 critical_exit();
114}
115
116void
117set_gsbase(struct thread *td, uint32_t base)
118{
119 struct segment_descriptor sd;
120
121 fill_based_sd(&sd, base);
122 critical_enter();
123 td->td_pcb->pcb_gsd = sd;
123 PCPU_GET(fsgs_gdt)[1] = sd;
124 if (td == curthread)
125 PCPU_GET(fsgs_gdt)[1] = sd;
124 critical_exit();
125}
126
127#ifndef _SYS_SYSPROTO_H_
128struct sysarch_args {
129 int op;
130 char *parms;
131};

--- 678 unchanged lines hidden ---
126 critical_exit();
127}
128
129#ifndef _SYS_SYSPROTO_H_
130struct sysarch_args {
131 int op;
132 char *parms;
133};

--- 678 unchanged lines hidden ---