Craddock, Chris wrote:
Nope! After a normal post the compare value is going to be X'40000000'
and the swap value is going to be 0. If another post intervenes and
stores another X'40000000' in place of the first, then the compare is
going to succeed and you'll miss a valid post. There's no way out of
this dilemma.
You're assuming that all POSTs will have the same completion
code; since this is program dependent, you have no knowledge of
the likelihood. A dilemma exists only in poorly implemented code.
Either the POSTing task should wait for acknowledgment; or
> In anything but the most trivial case you need more
> application logic combined with a queuing mechanism so that
> missing a post is harmless.
Exactly. Usually that is handled by establishing a chain of work
requests (protected by CDS), followed by a POST that work has
been queued. Then multiple POSTs won't cause any harm.
In neither case is there a problem with the POST/WAIT design,
only its use. You might as well complain that a shared enqueue
doesn't protect you from changes.
Gerhard Postpischil
Bradford, VT
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html