X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Finterrupt.c;h=c886cc9d709ab71a3c4bc870eb758ea92321b1a5;hb=9818aeac330907b5b314ac58c861d3dba8b15e5e;hp=fca145e10b96244cd8ee2872f76f46c432528854;hpb=2559f61a41ebfca4f17aae39c89b77a8f1c5c80f;p=pintos-anon diff --git a/src/threads/interrupt.c b/src/threads/interrupt.c index fca145e..c886cc9 100644 --- a/src/threads/interrupt.c +++ b/src/threads/interrupt.c @@ -3,6 +3,7 @@ #include #include #include +#include "threads/flags.h" #include "threads/intr-stubs.h" #include "threads/io.h" #include "threads/mmu.h" @@ -50,7 +51,7 @@ intr_get_level (void) { uint32_t flags; - asm ("pushfl; popl %0" : "=g" (flags)); + asm volatile ("pushfl; popl %0" : "=g" (flags)); return flags & FLAG_IF ? INTR_ON : INTR_OFF; } @@ -117,6 +118,7 @@ intr_init (void) intr_names[11] = "#NP Segment Not Present"; intr_names[12] = "#SS Stack Fault Exception"; intr_names[13] = "#GP General Protection Exception"; + intr_names[14] = "#PF Page-Fault Exception"; intr_names[16] = "#MF x87 FPU Floating-Point Error"; intr_names[17] = "#AC Alignment Check Exception"; intr_names[18] = "#MC Machine-Check Exception";