On 15 April 2011 16:26, Hall, Keven <[email protected]> wrote:

> POST will not re-Post an ECB that has its POST bit set.  Once a WAITing
> task is POSTed, I generally load the ECB contents and then if I need to
> reuse it I zero it out with something like:
>   MVC  ECB,=F'0' or
>   XC   ECB,ECB   or
>   ST   Rx,ECB    (assuming the value in Rx is zero)
>
> This is safe even if multiple concurrent units of work exist that are
> potential POSTers because the ECB is a word on a word boundary so
> updates appear block concurrent to other CPUs).

MVC and ST are fine, but I think you're on thin ice with that XC. XC
could fetch the original value (say it's X'80000001') once as the
first operand, then another CPU could change the word in storage using
ST (or even CS or the like), say to X'C0000002', then your XC could
fetch that changed value as the second operand, XOR it with the first
one, and store the result X'40000003'. All nicely single access and
block-concurrent, but XC is a noninterlocked-update instruction, even
when acting on a fullword.

I'm sure on any modern CPU the special case of XC with both operand
addresses the same will not actually fetch anything, but it is allowed
to.

Tony H.

Reply via email to