|
|
The rules relating to locking critical code are the same those given in ``Protecting critical code''. Functions are provided for locking and unlocking the tty structure. In writing a tty device driver, you would include, at the start of a critical section, the line:
tc_tlock(tp);and similarly at the end of the critical section, you would use the tc_tunlock(D3oddi) routine:
tc_tunlock(tp,...);