Thanks Binyamin. Also a great example but it brings me to another question. What is the advantage of using PLO compare and fetch? Is it just saving CPU time in the case where the counter has changed? Is there another advantage that I'm not thinking about?
Jon Perryman. >________________________________ > From: Binyamin Dissen <bdis...@dissensoftware.com> > > > >If you truly need a triple compare and swap then PLO will not help you. But if >you need a disjoint double compare and swap, you use the compare-and-swap >field as a counter and then you con do a compare swap and double store. > >Example: > > Fetch counter >A PLO compare-and-fetch value1 > CC>0, go to A > PLO compare-and-fetch value 2 > CC>0, go to A > calculate new value1 and 2 > Add one to fetched counter > PLO CSDST fetched-counter new-fetched-counter, new value1, new-value2 > CC>0, go to A > > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN