RTS: fix pushWSDeque to invoke write barrier when element is added

Authored by kgardas on Jul 9 2011, 11:07 AM.

Description

RTS: fix pushWSDeque to invoke write barrier when element is added

This patch fixes RTS' pushWSDeque function. We need to invoke
write barrier after element is added to the queue and before moving
bottom. The reason for this is possible write reordering on modern CPUs
(e.g. ARMv7MP) where setting of element might be done later after moving
bottom. When such situation happen other thread might be waiting to steal
data from the queue and when bottom is moved it eagerly steals undefined
data from the queue since setting of element has not happened yet.

Details

Committed
Manuel M T Chakravarty <chak@cse.unsw.edu.au>Aug 10 2011, 7:03 AM
Pushed
bgamariAug 25 2016, 1:39 PM
Parents
rGHCDIFFa9b455c4b696: RTS: fix xchg/cas fcns to invoke memory barrier on ARMv7 platform
Branches
Unknown
Tags
Unknown