DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Notes and examples for multithreaded TTY drivers

Locking

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,...);

© 2005 The SCO Group, Inc. All rights reserved.