GDSX (Extended General Device Support) Manual

LINE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual—529931-001
7-5
Intertask Communication—LINE^HANDLER
Perspective
When the WAIT^EVENT procedure is called, control is transferred to TSCODE, which
checks to see whether certain events have occurred. The events checked for are
specified in a bit-encoded mask passed to TSCODE along with a timeout parameter.
When one of these specified events occurs, TSCODE returns an indicator of the event
type.
Figure 7-2. Sending a WRITEREAD Through a LINE^HANDLER (page2of2)
Application
D^H Task
L^H Task IOP/Terminal
The L^H task detects the intertask
request and then issues a
^WRITEREAD to send the data to the
terminal (line).
VST029.vsd
The L^H task can continue to process
other requests, but checks for the I/O
completion event.
TSCODE receives the I/O completion message, identifies which L^H task
the message is for, and uses WAKE^TASK to pass it to the L%H task for
processing.
The L^H task locates the IOCB
belonging to the original request and
calls NOTIFY^IO^COMPLETION
NOTIFY^IO^COMPLETION causes TSCODE to execute a
WAKE^TASK and pass the information on to the D^H task.
The D^H task sends a response to
the application by calling ^REPLY.
Requester
receives
response.
Data goes to
the IOP and is
sent to the
terminal (line).
The I/O
completion
message is
sent.