GDSX (Extended General Device Support) Manual
User Exit Descriptions
Extended General Device Support (GDSX) Manual—529931-001
9-3
LINE^HANDLER
terminal-type input
INT:value
is the terminal type, which may be used to inform the task of the type of terminal it
is to support or the subset of DEVICE^HANDLER code that the task is to execute.
Use of terminal-type is completely application-dependent. TSCODE does not
use this variable.
The value passed by TSCODE is zero, unless the file to be handled is
preconfigured by an SCF ADD and/or ALTER command with an SUTYPE attribute
specified as a different type. For example, the following SCF command could be
used to add an SU with SU type 3, causing TSCODE to pass 3 as the value of
terminal-type when DEVICE^HANDLER is called:
-> ADD SU $GDSX.#LX.T1, SUTYPE 3
Considerations
•
This procedure operates in an infinite loop to process requests.
•
By setting a DEVICE^HANDLER task’s tcb.statex flag (bits <0:3>) to a nonzero
value, you can make the task unstoppable.
LINE^HANDLER
This procedure is typically used to allow each requester thread to use a shared
resource, often a communications line, without allowing the threads to interfere with
each other. Running copies of LINE^HANDLER code are called LINE^HANDLER
tasks.
A LINE^HANDLER task is created by a call to the LINE^HANDLER procedure as
follows:
1. When TSCODE receives and processes an SCF START LINE command,
TSCODE opens the file associated with the LINE and assigns the actual Guardian
file number to the filenum, to be used by the LINE^HANDLER task to address
the file.
2. TSCODE also creates a $RECEIVE-like file with address receive-number for
the LINE^HANDLER task to use when picking up messages from the
DEVICE^HANDLER tasks mapped to the LINE^HANDLER task.
3. TSCODE then calls the LINE^HANDLER procedure, thereby creating a
LINE^HANDLER task to manage the LINE.
When calling the LINE^HANDLER procedure, TSCODE passes filenum and
receive-number, along with internal-number, which is an index that may be
used to find the LCB for this LINE in the LINE table.
A DEVICE^HANDLER associated with an SU on a LINE directs its I/O to the subdevice
to which it is mapped by using filenum. Recognizing filenum as an ITC file