Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix long-standing switchuvm() inconsistency.
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. :-)
- Loading branch information