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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
7391ee1695
commit
7bfe0b7116
@@ -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);
|
||||
|
Reference in New Issue
Block a user