aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 4990ef2b1fb7..9f47ab540f65 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -268,7 +268,6 @@ struct tty_struct {
268 struct mutex ldisc_mutex; 268 struct mutex ldisc_mutex;
269 struct tty_ldisc *ldisc; 269 struct tty_ldisc *ldisc;
270 270
271 struct mutex legacy_mutex;
272 struct mutex termios_mutex; 271 struct mutex termios_mutex;
273 spinlock_t ctrl_lock; 272 spinlock_t ctrl_lock;
274 /* Termios values are protected by the termios mutex */ 273 /* Termios values are protected by the termios mutex */
@@ -606,12 +605,8 @@ extern long vt_compat_ioctl(struct tty_struct *tty,
606 605
607/* tty_mutex.c */ 606/* tty_mutex.c */
608/* functions for preparation of BKL removal */ 607/* functions for preparation of BKL removal */
609extern void __lockfunc tty_lock(struct tty_struct *tty); 608extern void __lockfunc tty_lock(void) __acquires(tty_lock);
610extern void __lockfunc tty_unlock(struct tty_struct *tty); 609extern void __lockfunc tty_unlock(void) __releases(tty_lock);
611extern void __lockfunc tty_lock_pair(struct tty_struct *tty,
612 struct tty_struct *tty2);
613extern void __lockfunc tty_unlock_pair(struct tty_struct *tty,
614 struct tty_struct *tty2);
615 610
616/* 611/*
617 * this shall be called only from where BTM is held (like close) 612 * this shall be called only from where BTM is held (like close)
@@ -626,9 +621,9 @@ extern void __lockfunc tty_unlock_pair(struct tty_struct *tty,
626static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, 621static inline void tty_wait_until_sent_from_close(struct tty_struct *tty,
627 long timeout) 622 long timeout)
628{ 623{
629 tty_unlock(tty); /* tty->ops->close holds the BTM, drop it while waiting */ 624 tty_unlock(); /* tty->ops->close holds the BTM, drop it while waiting */
630 tty_wait_until_sent(tty, timeout); 625 tty_wait_until_sent(tty, timeout);
631 tty_lock(tty); 626 tty_lock();
632} 627}
633 628
634/* 629/*
@@ -643,16 +638,16 @@ static inline void tty_wait_until_sent_from_close(struct tty_struct *tty,
643 * 638 *
644 * Do not use in new code. 639 * Do not use in new code.
645 */ 640 */
646#define wait_event_interruptible_tty(tty, wq, condition) \ 641#define wait_event_interruptible_tty(wq, condition) \
647({ \ 642({ \
648 int __ret = 0; \ 643 int __ret = 0; \
649 if (!(condition)) { \ 644 if (!(condition)) { \
650 __wait_event_interruptible_tty(tty, wq, condition, __ret); \ 645 __wait_event_interruptible_tty(wq, condition, __ret); \
651 } \ 646 } \
652 __ret; \ 647 __ret; \
653}) 648})
654 649
655#define __wait_event_interruptible_tty(tty, wq, condition, ret) \ 650#define __wait_event_interruptible_tty(wq, condition, ret) \
656do { \ 651do { \
657 DEFINE_WAIT(__wait); \ 652 DEFINE_WAIT(__wait); \
658 \ 653 \
@@ -661,9 +656,9 @@ do { \
661 if (condition) \ 656 if (condition) \
662 break; \ 657 break; \
663 if (!signal_pending(current)) { \ 658 if (!signal_pending(current)) { \
664 tty_unlock(tty); \ 659 tty_unlock(); \
665 schedule(); \ 660 schedule(); \
666 tty_lock(tty); \ 661 tty_lock(); \
667 continue; \ 662 continue; \
668 } \ 663 } \
669 ret = -ERESTARTSYS; \ 664 ret = -ERESTARTSYS; \