main-hotspot-taskqueue (original) (raw)
rev 3897 : Fix memory ordering in taskqueue for platforms with weak memory ordering (PPC)
Accesses to fields _bottom and _age were not properly ordered for platforms with weak memory ordering. Volatile is not sufficient to enforce this, because it depends on what the compiler assumes to be necessary for volatile variables.
Pull getter/setter routines to TaskQueueSuper and use methods from OrderAccess to access the fields in _age. Change the code to always use the getter/setter methods. Relax constraints for accesses to locals oldAge and newAge.
The OrderAccess routines used do simple load/stores on x86_64.
79 lines changed: 41 ins; 11 del; 27 mod; 734 unchg
This code review page was prepared using /usr/local/bin/webrev.ksh(vers 23.18-hg).