projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add "memory" as clobber to the asm used by barrier().
[pintos-anon]
/
src
/
threads
/
synch.h
diff --git
a/src/threads/synch.h
b/src/threads/synch.h
index 6b8f550e8798f6b9b916cf15ce8ec72861e283a8..9e464e3876400f60fafbc44a105f859ffd4b6938 100644
(file)
--- a/
src/threads/synch.h
+++ b/
src/threads/synch.h
@@
-45,6
+45,6
@@
void cond_broadcast (struct condition *, struct lock *);
The compiler will not reorder operations across an
optimization barrier. */
-#define barrier() asm volatile ("")
+#define barrier() asm volatile (""
: : : "memory"
)
#endif /* threads/synch.h */