summaryrefslogtreecommitdiff
path: root/include/linux/tty_flip.h
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-06-15 17:36:08 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-24 03:47:08 +0400
commit7bfe0b7116be207cf2204ae06335cc89d8f8ee02 (patch)
tree03175cd2ce9dd8013c4aaa8e2dd426767aa1a4c7 /include/linux/tty_flip.h
parent7391ee16950e772076d321792d9fbf030f921345 (diff)
downloadlinux-7bfe0b7116be207cf2204ae06335cc89d8f8ee02.tar.xz
tty: Track flip buffer memory limit atomically
Lockless flip buffers require atomically updating the bytes-in-use watermark. The pty driver also peeks at the watermark value to limit memory consumption to a much lower value than the default; query the watermark with new fn, tty_buffer_space_avail(). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty_flip.h')
-rw-r--r--include/linux/tty_flip.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h
index ad0303994c32..6944ed2ce692 100644
--- a/include/linux/tty_flip.h
+++ b/include/linux/tty_flip.h
@@ -1,6 +1,7 @@
#ifndef _LINUX_TTY_FLIP_H
#define _LINUX_TTY_FLIP_H
+extern int tty_buffer_space_avail(struct tty_port *port);
extern int tty_buffer_request_room(struct tty_port *port, size_t size);
extern int tty_insert_flip_string_flags(struct tty_port *port,
const unsigned char *chars, const char *flags, size_t size);