]> Devi Nivas Git - cs3210-lab0.git/commit
Fix long-standing switchuvm() inconsistency.
authorPeter Froehlich <peter.hans.froehlich@gmail.com>
Fri, 23 Dec 2016 01:26:37 +0000 (20:26 -0500)
committerFrans Kaashoek <kaashoek@mit.edu>
Tue, 31 Jan 2017 00:31:24 +0000 (19:31 -0500)
commit8d1f99637af48e28c0b4ebbe044e47abcefb5a5c
tree999310b49358018182cb249cb95125ec6b7f4535
parente916d668f7b184c41ee3d912ccda8cc7ca4aa765
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. :-)
vm.c