In
<CAAJSdjgh6wfQ6EVWCc+8hYn5Un4yKPzr6Sj-up=b2qbjsfa...@mail.gmail.com>,
on 11/29/2013
   at 06:57 PM, John McKown <[email protected]> said:

>Suppose that I have a program which is heavily multitasking. There 
>is the parent task and multiple subtasks, all direct children of 
>the single parent. The ATTACHX macro uses the ETXR parameter, 
>which specifies a single routine which does housekeeping of some 
>sort. Also assume that the subtasks are being created and ending 
>"randomly". That is the main task is "doing its thing", then a 
>subtask ends and drives the ETXR code under the parent TCB 
>(I think under an IRB).

Yes.

>Now this can happen anywhere in the parent's "main loop", so I 
>know that I need to serialize properly between the "main loop" 
>code and the ETXR code.

Since the main loop is suspended while the exit is running, the
synchronization requirements are different from those for asynchronous
threads. You must use a technique that does not lock out the exit
waiting for the main loop.

>if a second child terminates while the parent TCB is in the ETXR 
>code for a child, will the ETXR code be interrupted and 
>"redriven" for the newly terminating child TCB.

Yes, except for privileged routines that have temporarily suppressed
exits.

-- 
     Shmuel (Seymour J.) Metz, SysProg and JOAT
     ISO position; see <http://patriot.net/~shmuel/resume/brief.html> 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to