Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
fbc3fc41
Commit
fbc3fc41
authored
Feb 06, 2009
by
Simon Marlow
Browse files
crucial bugfix: add a store/load memory barrier to popWSDeque()
parent
03ef5bd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
rts/parallel/WSDeque.c
View file @
fbc3fc41
...
...
@@ -130,7 +130,14 @@ popWSDeque (WSDeque *q)
b
=
q
->
bottom
;
/* "decrement b as a test, see what happens" */
q
->
bottom
=
--
b
;
b
--
;
q
->
bottom
=
b
;
// very important that the following read of q->top does not occur
// before the earlier write to q->bottom.
store_load_barrier
();
pos
=
(
q
->
elements
)
+
(
b
&
(
q
->
moduloSize
));
t
=
q
->
top
;
/* using topBound would give an *upper* bound, we
need a lower bound. We use the real top here, but
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment