PLO CSDST and CSTST are *extremely* useful for queue and linked list 
manipulation in multi-ASID multi-TCB environments. The key to their use is to 
have a lock word counter that the caller increments and then prepares the new 
values in other regs. When it comes time to actually atomically update the lock 
word, you can redrive the structure manipulation logic if the CC indicates that 
the lock word value has changed, otherwise the other fields are updated 
atomically.

For actual practical uses, it is well worth putting all this inside some sort 
of macro or small stub service as you do not want to have to code the guts of 
it each time. 

I also think the uptake of PLO would be greater if there were some decent 
example code in the manuals - for instance a client adding a request to the 
tail of the queue whilst a server is removing from the head.


Rob Scott
Rocket Software
> On 4 Nov 2013, at 03:58, "Jon Perryman" <jperr...@pacbell.net> wrote:
> 
> I sure missed that one with the locks. 
> 
> PLO CDS does exactly what is wanted.  It does 2 CS's within the locked 
> instruction. 
> 
> PLO CSDST on the other hand only does a single CS followed by 2 ST's. Since 3 
> separate load instructions (not under PLO control) are required when not in 
> contiguous storage, there is not any method that will guarantee the 3 values 
> are consistent with the others. A counter as suggested by Peter Relson won't 
> help either for this same reason.
> 
> 
> I can't think of a situation where PLO CSDST is useful. Can anyone describe a 
> situation where it is useful?
> 
> Jon Perryman.
> 
> 
> 
>> ________________________________
>> From: Rob Scott <rsc...@rocketsoftware.com>
>> 
>> 
>> 
>> I think the OP stated that his code could hold locks - in which case the 
>> latch services cannot be used.
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to