projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ceaae60
)
Add "memory" as clobber to the asm used by barrier().
author
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 10 Nov 2006 15:51:03 +0000
(15:51 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 10 Nov 2006 15:51:03 +0000
(15:51 +0000)
Otherwise at least some versions of GCC assume that no changes to
memory can take place.
src/threads/synch.h
patch
|
blob
|
history
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 */