next up previous
Next: About this document Up: The Terminal Driver Previous: Lower-Half Input Processing

Miscellaneous

Device Driver Control

The implementation of the control (devptr, func, addr) operation is simple. Most functions simply change the appropriate control parameter. The only non-trivial function is the TCNEXTC function, which looks ahead 1 character. It waits on isem, reads the character at the tail of the input buffer without changing the tail pointer, and signals isem since the character was not actually consumed.

Tty Control Block Initialization

A procedure ttyinit is called to do device-specific initialization of the dispatch table entry, device registers, and control block of each SLU device.

It manipulates the dispatch table entry as follows:

For efficiency reasons, it changes the input and output code of in the dispatch table from the minor number to a pointer to the control block.

It initializes the control block as follows:

Sets the terminal parameters.

Initializes control parameters.

Initializes other parameters.

It sets the device registers as follows:

Clears RBUF so that a new character can be received in it.

Enables input interrupts.

Disables output interrupts.


Prasun Dewan
Thu Feb 12 11:37:50 EST 2004