🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.appc-l
Article #375

Determining if I need to do a cmaccp()??

#375
From: thomas
Date: Wed, 26 Jan 1994 23:02
38 lines
2658 bytes
I am having to interact with an IMS system that only supports single
session LUs.  I must also send and receive asynchronously.  I would
like to design my OS/2 TP to be two-threaded (one send, one receive),
with each thread gaining access to the session 'resource' via a mutex
semaphore.  The way this IMS system works (it's the IMS LU6.1/6,2
adapter) is as follows

      PC                         IMS 6.1/6.2          IMS TRAN
(T1)  DosRequestMutex
(T1)  cminit/cmallc -----------> ACCEPT
(T1)  cmsend        -----------> RECEIVE
               ...
(T1)  cmdeal        ----------->
(T1)  DosReleaseMutex            CALL IMS TRAN-------> Do Work
                                              <------- Results
(T2)  DosRequestMutex
(T2)  cmaccp        <----------- ALLOCATE
(T2)  cmrcv         <----------- SEND
               ...
                    <----------- DEALLOCATE
(T2)  DosReleaseMutex

T1 indicates tasks done in thread 1, and T2 indicates tasks done in
thread 2. My problem is that since cmaccp() will block indefinitely
until an allocation is received, my design will deadlock.

Is there a way that thread 2 can avoid doing a cmaccp() until it is
necessary?

As always, thanks for your help.

BTW - Richard, thanks for the pointers to the CPI-C 2.0 specs.

| Tom S. Thomas                |                                      |
| Burlington Northern Railroad | E-mail: thomas@galileo.ftw.bnr.com   |
| 600 Continental Plaza        | Voice: (817) 333-7945                |
| 777 Main Street              | FAX: (817) 333-7833                  |
| Ft. Worth, TX 76102          |                                      |
Technical Details
Message-ID: <9401262315.AA1009@galileo.ftw.bnr.com>
Path: arc1-ca.pugleaf.net!gmd.de!urmel.informatik.rwth-aachen.de!newsserver.rrzn.uni-hannover.de!aix11.hrz.uni-oldenburg.de!uniol!news.uni-stuttgart.de!rz.uni-karlsruhe.de!xlink.net!zib-berlin.de!netmbx.de!Germany.EU.net!EU.net!howland.reston.ans.net!news.cac.psu.edu!psuvm!auvm!GALILEO.FTW.BNR.COM!thomas

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10aed9,ffb85e066cf155f0,start
X-Google-Attributes: gid10aed9,public
X-Google-ArrivalTime: 1994-01-27 01:04:20 PST
Path: arc1-ca.pugleaf.net!gmd.de!urmel.informatik.rwth-aachen.de!newsserver.rrzn.uni-hannover.de!aix11.hrz.uni-oldenburg.de!uniol!news.uni-stuttgart.de!rz.uni-karlsruhe.de!xlink.net!zib-berlin.de!netmbx.de!Germany.EU.net!EU.net!howland.reston.ans.net!news.cac.psu.edu!psuvm!auvm!GALILEO.FTW.BNR.COM!thomas
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.appc-l
Return-Path: <@AUVM.AMERICAN.EDU:owner-appc-l@AUVM.AMERICAN.EDU>
Return-Path: <@AUVM.AMERICAN.EDU:thomas@GALILEO.FTW.BNR.COM>
Return-Path: <thomas@galileo.ftw.bnr.com>
Message-ID: <9401262315.AA1009@galileo.ftw.bnr.com>
Date: Wed, 26 Jan 1994 17:02:52 CST
Reply-To: thomas@galileo.ftw.bnr.com
Sender: APPC Discussion List <APPC-L@AUVM.BITNET>
From: thomas@GALILEO.FTW.BNR.COM
Subject: Determining if I need to do a cmaccp()??
Lines: 37