Lines Matching defs:tty
2 #include <linux/tty.h>
7 #include "tty.h"
9 /* Legacy tty mutex glue */
12 * Getting the big tty mutex.
15 void tty_lock(struct tty_struct *tty)
17 tty_kref_get(tty);
18 mutex_lock(&tty->legacy_mutex);
22 int tty_lock_interruptible(struct tty_struct *tty)
26 tty_kref_get(tty);
27 ret = mutex_lock_interruptible(&tty->legacy_mutex);
29 tty_kref_put(tty);
33 void tty_unlock(struct tty_struct *tty)
35 mutex_unlock(&tty->legacy_mutex);
36 tty_kref_put(tty);
40 void tty_lock_slave(struct tty_struct *tty)
42 if (tty && tty != tty->link)
43 tty_lock(tty);
46 void tty_unlock_slave(struct tty_struct *tty)
48 if (tty && tty != tty->link)
49 tty_unlock(tty);
52 void tty_set_lock_subclass(struct tty_struct *tty)
54 lockdep_set_subclass(&tty->legacy_mutex, TTY_LOCK_SLAVE);