24.3 Initialisation

Initialisation of the “tty” structures is the responsibility of the various “open” routines in the device drivers, for example, “klopen” (8023).

The items in Group B of Table 24.1 may be changed by a “stty” system call. The current values may be interrogated by a “gtty” system call.

A description of these is contained in the sections, “STTY(II)” and “GTTY(II)” of the UPM. These calls are invoked by the “stty” shell command which is described in the section “STTY(I)”.

Since the “stty” and “gtty” system calls require a file descriptor as a parameter, they can only be applied to an “open” character special file.

The two system calls share a good deal of common code. We will trace the progress of an execution of “stty” below and leave the tracing of a similar execution of “gtty” to the reader.