X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fuserprog%2Fprocess.c;h=c0e521553f994dcc2f01004a3b4c28bedc2accb7;hb=9a602e952252dbfb1332f5137dd7c33a21b6fc6d;hp=6c6003cbf0f798262e53802beae7ab02084dc093;hpb=13bc50213bc87981f67ceabd7a623e05917fd09d;p=pintos-anon diff --git a/src/userprog/process.c b/src/userprog/process.c index 6c6003c..c0e5215 100644 --- a/src/userprog/process.c +++ b/src/userprog/process.c @@ -117,7 +117,8 @@ process_exit (void) } /* Sets up the CPU for running user code in the current - thread. */ + thread. + This function is called on every context switch. */ void process_activate (void) { @@ -128,7 +129,7 @@ process_activate (void) /* Set thread's kernel stack for use in processing interrupts. */ - tss_set_esp0 ((uint8_t *) t + PGSIZE); + tss_update (); } /* We load ELF binaries. The following definitions are taken