diff options
Diffstat (limited to 'include/linux/tty_flip.h')
-rw-r--r-- | include/linux/tty_flip.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h new file mode 100644 index 000000000000..abe9bfcf226c --- /dev/null +++ b/include/linux/tty_flip.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef _LINUX_TTY_FLIP_H | ||
2 | #define _LINUX_TTY_FLIP_H | ||
3 | |||
4 | #ifdef INCLUDE_INLINE_FUNCS | ||
5 | #define _INLINE_ extern | ||
6 | #else | ||
7 | #define _INLINE_ static __inline__ | ||
8 | #endif | ||
9 | |||
10 | _INLINE_ void tty_insert_flip_char(struct tty_struct *tty, | ||
11 | unsigned char ch, char flag) | ||
12 | { | ||
13 | if (tty->flip.count < TTY_FLIPBUF_SIZE) { | ||
14 | tty->flip.count++; | ||
15 | *tty->flip.flag_buf_ptr++ = flag; | ||
16 | *tty->flip.char_buf_ptr++ = ch; | ||
17 | } | ||
18 | } | ||
19 | |||
20 | _INLINE_ void tty_schedule_flip(struct tty_struct *tty) | ||
21 | { | ||
22 | schedule_delayed_work(&tty->flip.work, 1); | ||
23 | } | ||
24 | |||
25 | #undef _INLINE_ | ||
26 | |||
27 | |||
28 | #endif /* _LINUX_TTY_FLIP_H */ | ||
29 | |||
30 | |||
31 | |||
32 | |||
33 | |||
34 | |||
35 | |||