Skip to content
  • kgardas's avatar
    RTS: fix pushWSDeque to invoke write barrier when element is added · 9ebdbb27
    kgardas authored and chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au. committed
    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.
    9ebdbb27