Add memory clobbers to several asm statements,
[pintos-anon] / src / threads / thread.c
index 938d7f87d6b0b296e676ca971928a6ba0823fd27..1dc34adac7770f6bc53b5e5a1fb6b533ec0043f4 100644 (file)
@@ -389,7 +389,7 @@ idle (void *idle_started_ UNUSED)
 
          See [IA32-v2a] "HLT", [IA32-v2b] "STI", and [IA32-v3a]
          7.11.1 "HLT Instruction". */
-      asm ("sti; hlt");
+      asm volatile ("sti; hlt" : : : "memory");
     }
 }