GDSX (Extended General Device Support) Manual
LINE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual—529931-001
7-7
Transaction Flow
NOTIFY^IO^COMPLETION[X] is a procedure commonly used to complete I/O 
operations in a task. A task calls this procedure to notify a DEVICE^HANDLER task 
that an intertask request is complete. 
All DEVICE^HANDLER tasks may have intertask requests outstanding at the same 
time. The LINE^HANDLER task must manage communication of these requests to a 
shared file (a terminal in this example) so that the threads do not interfere with each 
other. The LINE^HANDLER task may queue the requests that come in and track any 
request outstanding on the file so that when the request completes, a reply by way of 
NOTIFY^IO^COMPLETION[X] returns the response’s IOCB address to the right 
DEVICE^HANDLER task. 
To the DEVICE^HANDLER the completion appears to be a standard file-system I/O 
completion, with data returned in the buffer specified when the I/O was initiated and 
standard Guardian condition codes set.
Transaction Flow
Before the basic structure of the LINE^HANDLER code is described, consider the 
normal thread, or sequence of actions that occur for a complete transaction 
(WRITEREAD-WRITE) initiated by an APPL requester application. 
TSCODE passes the request to the DEVICE^HANDLER task handling the SU 
specified by the requester. The DEVICE^HANDLER does datastream conversion and 
sends a ^WRITEREAD to the terminal file number, as shown in Figure 7-3.










