diff options
| author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-23 14:02:19 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-23 14:02:19 -0500 |
| commit | 99a85b901eb54f62ff0c3fd6eb56e60b7b9f15c8 (patch) | |
| tree | 0c6637b7d2172e079c30e966847326767cbaf45c /include/linux/tty.h | |
| parent | 135f9be9194cf7778eb73594aa55791b229cf27c (diff) | |
| parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) | |
Merge tag 'v4.0-rc1' into patchwork
Linux 34.0-rc1
* tag 'v4.0-rc1': (8947 commits)
Linux 4.0-rc1
autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
procfs: fix race between symlink removals and traversals
debugfs: leave freeing a symlink body until inode eviction
Documentation/filesystems/Locking: ->get_sb() is long gone
trylock_super(): replacement for grab_super_passive()
fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
SELinux: Use d_is_positive() rather than testing dentry->d_inode
Smack: Use d_is_positive() rather than testing dentry->d_inode
TOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR()
Apparmor: Use d_is_positive/negative() rather than testing dentry->d_inode
Apparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb
VFS: Split DCACHE_FILE_TYPE into regular and special types
VFS: Add a fallthrough flag for marking virtual dentries
VFS: Add a whiteout dentry type
VFS: Introduce inode-getting helpers for layered/unioned fs environments
kernel: make READ_ONCE() valid on const arguments
blk-throttle: check stats_cpu before reading it from sysfs
...
Diffstat (limited to 'include/linux/tty.h')
| -rw-r--r-- | include/linux/tty.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 7d66ae508e5c..358a337af598 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -14,6 +14,29 @@ | |||
| 14 | #include <linux/llist.h> | 14 | #include <linux/llist.h> |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | /* | ||
| 18 | * Lock subclasses for tty locks | ||
| 19 | * | ||
| 20 | * TTY_LOCK_NORMAL is for normal ttys and master ptys. | ||
| 21 | * TTY_LOCK_SLAVE is for slave ptys only. | ||
| 22 | * | ||
| 23 | * Lock subclasses are necessary for handling nested locking with pty pairs. | ||
| 24 | * tty locks which use nested locking: | ||
| 25 | * | ||
| 26 | * legacy_mutex - Nested tty locks are necessary for releasing pty pairs. | ||
| 27 | * The stable lock order is master pty first, then slave pty. | ||
| 28 | * termios_rwsem - The stable lock order is tty_buffer lock->termios_rwsem. | ||
| 29 | * Subclassing this lock enables the slave pty to hold its | ||
| 30 | * termios_rwsem when claiming the master tty_buffer lock. | ||
| 31 | * tty_buffer lock - slave ptys can claim nested buffer lock when handling | ||
| 32 | * signal chars. The stable lock order is slave pty, then | ||
| 33 | * master. | ||
| 34 | */ | ||
| 35 | |||
| 36 | enum { | ||
| 37 | TTY_LOCK_NORMAL = 0, | ||
| 38 | TTY_LOCK_SLAVE, | ||
| 39 | }; | ||
| 17 | 40 | ||
| 18 | /* | 41 | /* |
| 19 | * (Note: the *_driver.minor_start values 1, 64, 128, 192 are | 42 | * (Note: the *_driver.minor_start values 1, 64, 128, 192 are |
| @@ -443,6 +466,7 @@ extern void tty_flush_to_ldisc(struct tty_struct *tty); | |||
| 443 | extern void tty_buffer_free_all(struct tty_port *port); | 466 | extern void tty_buffer_free_all(struct tty_port *port); |
| 444 | extern void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld); | 467 | extern void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld); |
| 445 | extern void tty_buffer_init(struct tty_port *port); | 468 | extern void tty_buffer_init(struct tty_port *port); |
| 469 | extern void tty_buffer_set_lock_subclass(struct tty_port *port); | ||
| 446 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); | 470 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); |
| 447 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); | 471 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); |
| 448 | extern void tty_termios_encode_baud_rate(struct ktermios *termios, | 472 | extern void tty_termios_encode_baud_rate(struct ktermios *termios, |
| @@ -467,7 +491,6 @@ static inline speed_t tty_get_baud_rate(struct tty_struct *tty) | |||
| 467 | 491 | ||
| 468 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); | 492 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); |
| 469 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); | 493 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); |
| 470 | extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt); | ||
| 471 | 494 | ||
| 472 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); | 495 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); |
| 473 | extern void tty_ldisc_deref(struct tty_ldisc *); | 496 | extern void tty_ldisc_deref(struct tty_ldisc *); |
