aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty.h
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-04-30 03:53:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:40 -0400
commit04f378b198da233ca0aca341b113dc6579d46123 (patch)
tree696e7bd401125cee71ecaa2047c4273f38732554 /include/linux/tty.h
parente52384426064bca0669a954736206adca7595d48 (diff)
tty: BKL pushdown
- Push the BKL down into the line disciplines - Switch the tty layer to unlocked_ioctl - Introduce a new ctrl_lock spin lock for the control bits - Eliminate much of the lock_kernel use in n_tty - Prepare to (but don't yet) call the drivers with the lock dropped on the paths that historically held the lock BKL now primarily protects open/close/ldisc change in the tty layer [jirislaby@gmail.com: a couple of fixes] Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 265831ccaa88..4d3702bade03 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -183,6 +183,7 @@ struct tty_struct {
183 int index; 183 int index;
184 struct tty_ldisc ldisc; 184 struct tty_ldisc ldisc;
185 struct mutex termios_mutex; 185 struct mutex termios_mutex;
186 spinlock_t ctrl_lock;
186 struct ktermios *termios, *termios_locked; 187 struct ktermios *termios, *termios_locked;
187 char name[64]; 188 char name[64];
188 struct pid *pgrp; 189 struct pid *pgrp;
@@ -323,8 +324,7 @@ extern void tty_ldisc_put(int);
323extern void tty_wakeup(struct tty_struct *tty); 324extern void tty_wakeup(struct tty_struct *tty);
324extern void tty_ldisc_flush(struct tty_struct *tty); 325extern void tty_ldisc_flush(struct tty_struct *tty);
325 326
326extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 327extern long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
327 unsigned long arg);
328extern int tty_mode_ioctl(struct tty_struct *tty, struct file *file, 328extern int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
329 unsigned int cmd, unsigned long arg); 329 unsigned int cmd, unsigned long arg);
330extern int tty_perform_flush(struct tty_struct *tty, unsigned long arg); 330extern int tty_perform_flush(struct tty_struct *tty, unsigned long arg);