GDSX (Extended General Device Support) Manual

Service Routines
Extended General Device Support (GDSX) Manual529931-001
8-68
SEND^ITC^MSG[X]
Consideration
Because GDSX does not support multithreaded user tasks that use TMF,
^RESUMETRANSACTION cannot be used to switch back and forth between different
transactions within one user task.
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, Intertask Communication Example for an example of using
SEND^ITC^MSG[X] for intertask communication between two DEVICE^HANDLER
tasks.
fcb input
INT .EXT:ref
CALL SEND^ITC^MSG[X] ( fcb !
i
,[ message ] !
i
,write-count !
i
,read-count !
i
,[ tag ] !
i
,op-code ); !
i