@@ -189,15 +189,13 @@ not changed since we read it: the slot is still available.
We write the new item, then we update the status accordingly. This update must
come last, as it serves as a signal that the slot is now occupied with an item
and ready for dequeuers.
%Notice that, under weak memory, the order of these two writes matters: the
%
%Notice that, under weak memory, another reason why the order of these two writes matters is that the
%atomic write to \refstatuses must propagate the information that the nonatomic
%write to \refelements has taken place. Thus, a thread which dequeues this item
%(after reading its status) is certain to read a correct value from the array
%\refelements. This is a typical release/acquire idiom.
% TODO : JH : Ok, mais c'est aussi nécessaire dasn un modèle SC, puisque l'écriture du statut correspond au relacheemnt du lock : si on s'amusait à remplir la cellule après écrire dasn statut, alors le dequeuer pourrait commencer à lire le contenu de la cellule avant que celle-ci ait été remplie, non ? Pour moi, c'est une meilleure justification pour l'odre des opérations. Les questions de mémoire faible sont plus subtiles et nécessitent d'avoir compris un peu la spec.
Similarly, \dequeue repeatedly calls \trydequeue untils it succeeds;