> There is another problem COMECBPT is key 0 storage and MY_ECB is key
> 8 WAIT requires the user to be in the key of the ECB would I have the
> that problem using SELECB

Except for the communications ECB!

There is a special check in wait for the communications ECB to allow
problem key callers to wait on it even though the communications ECB is
in key zero storage..

The following is a good point from Rob Scott <[email protected]>

> Personally I would not mix the operator communications in the same task
> and ECBLIST as the TCP/IP API.

> I would have a master controller task that would deal with any operator
> comms and also manage the various "other" subtasks of which one would
> be the listener agent.

> The listener agent would then attach handler subtasks itself.

> Any operator initiated action would to captured by the controller task
> and communicated down to the listener which can then pass it down to
> the handler tasks.

> Suggested task structure :

> TCB1 (Main controller - Deals with CIBs)
> ---> TCB2 (TCP/IP listener - subtask of TCB1)
> ----->TCB3A TCB3B TCB3C (Socket handler subtasks of TCB2)

One reason for this is to avoid doing a wait on the communications ECB
every time your task doing most of the work wakes up.  The assumption
is that the communications ECB will usually not be posted so removing
it from the ECBLIST makes the list 1 shorter.  That's one less ECB which:

a. on wait gets validity checked
b. on wait gets the wait bit set
c. post validity checks the target ECB, then if post is to wake the task:
e. - post validity check the ther ECBs in the ECBLIST
d. - clear the wait bit on other ECBs in ECBLIST

It's also possibly much more overhead than 1 ECB less as the "exception"
which allows waiting on the communications task isn't (wasn't) a short
code path.  At least in MVS 3.8 it involved wait getting a program check
trying to validate the communications ECB and wait's FRR deciding no,
that was ok, it's the communications ECB.

So to avoid this extra overhead the task which waits on the communications
ECB should be one which rarely wakes up.

PS: The MVS code may have changed since them...  Or not...

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

Reply via email to