Donald,

I suspect it would be better to investigate why your CS code did not work
than to start messing with locks.

On Wed, Aug 10, 2011 at 9:46 AM, Donald Likens <[email protected]>wrote:

> I was planning to check the return code of the obtain lock to determine if
> I should release it. I do not think it is as elegant as your approach but I
> think a little easier. Does anyone see a flaw in this idea?
>
> You stated that I could not get the CML lock if the local lock is help. Is
> there a problem getting the local lock if the CML lock is held?
>
> So my logoc will look like the following:
>
>         SETLOCK OBTAIN,TYPE=LOCAL,             LOCAL LOCK
>          set localrc = r15
>         SETLOCK OBTAIN,TYPE=CMS,               CROSS-MEMORY SERVICES
>     X
>         set cmsrc = r15
>         Update my CSA buffer
>         if cmsrc = 0 setlock release,type=cms
>         if localrc = 0 setlock release,type=local
>
>
> ----------------------------------------------------------------------
> 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
>

CONFIDENTIALITY/EMAIL NOTICE: The material in this transmission contains
confidential and privileged information intended only for the addressee.
If you are not the intended recipient, please be advised that you have
received this material in error and that any forwarding, copying, printing,
distribution, use or disclosure of the material is strictly prohibited.
If you have received this material in error, please (i) do not read it,
(ii) reply to the sender that you received the message in error, and
(iii) erase or destroy the material. Emails are not secure and can be
intercepted, amended, lost or destroyed, or contain viruses. You are deemed
to have accepted these risks if you communicate with us by email. Thank you.

----------------------------------------------------------------------
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

Reply via email to