diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2013-06-15 11:28:28 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-17 19:55:11 (GMT) |
commit | f6c8dbe6e50c6e5121d7b6644718207daa008221 (patch) | |
tree | f7200d98ecaa899fb2c83d6b58b88a20b302f936 /include/linux | |
parent | a630fbfbb1beeffc5bbe542a7986bf2068874633 (diff) | |
download | linux-fsl-qoriq-f6c8dbe6e50c6e5121d7b6644718207daa008221.tar.xz |
n_tty: Encapsulate minimum_to_wake within N_TTY
minimum_to_wake is unique to N_TTY processing, and belongs in
per-ldisc data.
Add the ldisc method, ldisc_ops::fasync(), to notify line disciplines
when signal-driven I/O is enabled or disabled. When enabled for N_TTY
(by fcntl(F_SETFL, O_ASYNC)), blocking reader/polls will be woken
for any readable input. When disabled, blocking reader/polls are not
woken until the read buffer is full.
Canonical mode (L_ICANON(tty), n_tty_data::icanon) is not affected by
the minimum_to_wake setting.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/tty.h | 1 | ||||
-rw-r--r-- | include/linux/tty_ldisc.h | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 82ab69b..01ac30e 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -272,7 +272,6 @@ struct tty_struct { #define N_TTY_BUF_SIZE 4096 unsigned char closing:1; - unsigned short minimum_to_wake; unsigned char *write_buf; int write_cnt; /* If the tty has a pending do_SAK, queue it here - akpm */ diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index 7b24bbd..a1b0489 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h @@ -100,6 +100,11 @@ * seek to perform this action quickly but should wait until * any pending driver I/O is completed. * + * void (*fasync)(struct tty_struct *, int on) + * + * Notify line discipline when signal-driven I/O is enabled or + * disabled. + * * void (*dcd_change)(struct tty_struct *tty, unsigned int status) * * Tells the discipline that the DCD pin has changed its status. @@ -189,6 +194,7 @@ struct tty_ldisc_ops { char *fp, int count); void (*write_wakeup)(struct tty_struct *); void (*dcd_change)(struct tty_struct *, unsigned int); + void (*fasync)(struct tty_struct *tty, int on); struct module *owner; |