process device-dependent operations in a TTY driver
void prefixproc (struct tty *tp, int cmd);
entry point routine is called by the TTY subsystem
to process various device-dependent operations.
This routine is required for a character driver
that accesses the tty or linesw structures.
pointer to a tty structure
an operation that the
Typically, the driver encodes a case statement
for each comand with code to perform the operations
one of the following commands:
send command to the terminal controller
to stop input because the input queue
has reached the high-water mark
(buffer is full).
This condition should OR (enable)
the TBLOCK flag into the
of the tty structure.
send a break to a TTY device.
Typically, this command is not handled in the
instead, it is handled in the
send a command to the terminal controller
to request that it disconnect a terminal device
(tell it to drop carrier).
prepare a TTY device
to receive input.
initiate output to the device
if the device is not busy
or if output has not been suspended.
change parameters in the tty structure
of a particular device.
If the device is intelligent enough
to use the tty structure information,
routine is called to update the device
to the new parameters.
The shell layers sxt device driver's
routine calls the
routine of the device
with T_PARM when the tty structure
has been changed.
Send command to the terminal controller
to indicate that terminal output should be resumed
because a <Ctrl>-q character has been received.
The TTSTOP bit in the
of the tty structure should be cleared.
Note that if IXANY is set in the
of the termio structure,
any character can cause the terminal to resume.
for more information about the IXANY bit.
Send command to terminal controller
to flush terminal input queue.
t_state is set to TBLOCK,
call the T_UNBLOCK section of the
Send a character to the terminal controller
to suspend output to the terminal
because a <Ctrl>-s character has been received.
routine should set the TTSTOP bit
t_state member of the tty structure.
Switch between context layers on the
This condition is only used with the shell layers driver.
Typically, this section of code changes control
to channel 0 and wakes up any processes
sleeping on the SWTCH character
being input by the terminal device,
as in the following example:
The line discipline's
routine checks to see if an input character
is equal to
(normally <Ctrl>-z) and, if so,
to flush the input and output buffers
(if NOFLSH is not true)
and then calls the device driver's
routine with the command flag T_SWTCH set.
Notifies the driver that delay timing has completed
for an event such as a BREAK or a carriage return.
Allows further input when the input queue
has gone below the high water mark.
The driver developer resets
the TTXOFF and TBLOCK bits
when T_UNBLOCK is used.
Clears the transmit buffer characters.
1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp
SVR5 DDI compatibility
This routine is not supported for DDI drivers,
which implement serial devices with STREAMS drivers.
routine is only used in character drivers
that access the TTY subsystem,
indicated by a t in the second column of the
``TTY devices'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005