tty: Track flip buffer memory limit atomically
authorPeter Hurley <peter@hurleysoftware.com>
Sat, 15 Jun 2013 13:36:08 +0000 (09:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:47:08 +0000 (16:47 -0700)
commit7bfe0b7116be207cf2204ae06335cc89d8f8ee02
tree03175cd2ce9dd8013c4aaa8e2dd426767aa1a4c7
parent7391ee16950e772076d321792d9fbf030f921345
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>
drivers/tty/pty.c
drivers/tty/tty_buffer.c
include/linux/tty.h
include/linux/tty_flip.h