• Peter Froehlich's avatar
    Fix long-standing switchuvm() inconsistency. · 8d1f9963
    Peter Froehlich 提交于
    switchuvm() is supposed to switch the TSS and page table to the
    process p it is passed. Alas, instead of using p to access the
    kstack field, it used the global proc. This worked fine because
    (a) most uses of switchuvm() pass proc anyway and (b) because in
    the schedule, where we call switchuvm with the newly scheduled
    process, we actually set the global proc before the call. But I
    think it's still a bug, even if it never broke a test case. :-)
    8d1f9963
vm.c 9.8 KB