]> Devi Nivas Git - cs3210-lab0.git/commit
Read curproc from cpu structure, but be careful because after a schedule event
authorFrans Kaashoek <kaashoek@mit.edu>
Wed, 1 Feb 2017 01:21:14 +0000 (20:21 -0500)
committerFrans Kaashoek <kaashoek@mit.edu>
Wed, 1 Feb 2017 01:21:14 +0000 (20:21 -0500)
commitfbb4c0944422f860484142010bb9f366f3e87bf8
tree5e339842d43d09a4d23f1a2165391f00af30e308
parentabf847a083888bbed4260ecacf849ea19f23e810
Read curproc from cpu structure, but be careful because after a schedule event
myproc() points to a different thread.

   myproc();
   sched();
   myproc();  // this proc maybe different than the one before sched

Thus, in a function that operates on one thread better to retrieve the
current process once at the start of the function.
defs.h
exec.c
proc.c
proc.h
syscall.c
sysfile.c
vm.c