projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
thread: Do not disable interrupts unnecessarily while initializing stack.
[pintos-anon]
/
src
/
threads
/
synch.h
diff --git
a/src/threads/synch.h
b/src/threads/synch.h
index 6b8f550e8798f6b9b916cf15ce8ec72861e283a8..a19e88b181dff1208839ff890154aa69b299ce91 100644
(file)
--- a/
src/threads/synch.h
+++ b/
src/threads/synch.h
@@
-44,7
+44,8
@@
void cond_broadcast (struct condition *, struct lock *);
/* Optimization barrier.
The compiler will not reorder operations across an
/* Optimization barrier.
The compiler will not reorder operations across an
- optimization barrier. */
-#define barrier() asm volatile ("")
+ optimization barrier. See "Optimization Barriers" in the
+ reference guide for more information.*/
+#define barrier() asm volatile ("" : : : "memory")
#endif /* threads/synch.h */
#endif /* threads/synch.h */