Use curthread rather than PCPU_GET(curthread). 'curthread' uses
special-case optimizations on several platforms and is preferred. Reported by: dim (indirectly) MFC after: 2 weeks
This commit is contained in:
parent
a74d695299
commit
b494482f39
@ -553,7 +553,7 @@ user_ldt_free(struct thread *td)
|
||||
return;
|
||||
}
|
||||
|
||||
if (td == PCPU_GET(curthread)) {
|
||||
if (td == curthread) {
|
||||
#ifdef XEN
|
||||
i386_reset_ldt(&default_proc_ldt);
|
||||
PCPU_SET(currentldt, (int)&default_proc_ldt);
|
||||
|
@ -116,7 +116,7 @@ gdb_cpu_getreg(int regnum, size_t *regsz)
|
||||
{
|
||||
|
||||
*regsz = gdb_cpu_regsz(regnum);
|
||||
if (kdb_thread == PCPU_GET(curthread)) {
|
||||
if (kdb_thread == curthread) {
|
||||
register_t *zero_ptr = &kdb_frame->zero;
|
||||
return zero_ptr + regnum;
|
||||
}
|
||||
@ -154,7 +154,7 @@ gdb_cpu_setreg(int regnum, void *val)
|
||||
switch (regnum) {
|
||||
case GDB_REG_PC:
|
||||
kdb_thrctx->pcb_context[10] = *(register_t *)val;
|
||||
if (kdb_thread == PCPU_GET(curthread))
|
||||
if (kdb_thread == curthread)
|
||||
kdb_frame->pc = *(register_t *)val;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user