GDSX Manual
Service Routines
Extended General Device Support (GDSX) Manual–134303
8-67
SEND^ITC^MSG[X]
SEND^ITC^MSG[X]
This procedure initiates two-way communication between:
•
Two DEVICE^HANDLER tasks
•
A DEVICE^HANDLER task and a LINE^HANDLER task
•
Two LINE^HANDLER tasks
When calling the SEND^ITC^MSG[X] procedure, the sending task passes a pointer to
an FCB that contains a TCB address for the receiving task. SEND^ITC^MSG[X]
allocates an IOCB, which contains the TCB address of the calling task, and is linked to
the TCB for the calling task and to the FCB whose address is passed in the call. The
IOCB is also linked into the ITC request queue (addressed externally by
in^queue^file^num) for the receiving task. The intertask I/O initiation is completed by
causing an E^ITC event (assuming that the receiving task has a current ^READUPDATE
on its in-queue file) for the receiving task.
The receiving task detects an incoming message by first calling ^READUPDATE[X]
and then calling WAIT^EVENT, which returns E^ITC. A call to ^LISTEN(0, 0, 1)
returns the IOCB address. After the message is processed in the receiving task, a call to
NOTIFY^IO^COMPLETION[X] releases the IOCB and completes the communication
to the sending task that originated the request by calling SEND^ITC^MSG[X].
See Appendix E for an example of using SEND^ITC^MSG[X] for intertask
communication between two DEVICE^HANDLER tasks.
fcb input
INT .EXT:ref
is a pointer to an FCB corresponding to the calling task’s ITC file or to some other
file to which the I/O is to be linked. At the time of call, this FCB must contain the
TCB address for the receiving task in fcb.lhaddr.
When a DEVICE^HANDLER task is sending a message to a LINE^HANDLER
task that it is configured for, obtain the FCB address for the DEVICE^HANDLER
task’s ITC file by indexing into FCBTBL, the FCB table, with the terminal file
number. The terminal file number is passed when the DEVICE^HANDLER task is
CALL SEND^ITC^MSG[X] ( fcb !
i
,[ message ] !
i
,write-count !
i
,read-count !
i
,[ tag ] !
i
,op-code ); !
i