X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fthreads%2Finterrupt.c;h=3637b0013edd9c92f347f23f60e230ec00efcfbc;hb=07af4666a5d90db8500abacfe73d6fc2aeb6a7b7;hp=fca145e10b96244cd8ee2872f76f46c432528854;hpb=2559f61a41ebfca4f17aae39c89b77a8f1c5c80f;p=pintos-anon diff --git a/src/threads/interrupt.c b/src/threads/interrupt.c index fca145e..3637b00 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; }