tty_flip.h 552 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _LINUX_TTY_FLIP_H
  2. #define _LINUX_TTY_FLIP_H
  3. #ifdef INCLUDE_INLINE_FUNCS
  4. #define _INLINE_ extern
  5. #else
  6. #define _INLINE_ static __inline__
  7. #endif
  8. _INLINE_ void tty_insert_flip_char(struct tty_struct *tty,
  9. unsigned char ch, char flag)
  10. {
  11. if (tty->flip.count < TTY_FLIPBUF_SIZE) {
  12. tty->flip.count++;
  13. *tty->flip.flag_buf_ptr++ = flag;
  14. *tty->flip.char_buf_ptr++ = ch;
  15. }
  16. }
  17. _INLINE_ void tty_schedule_flip(struct tty_struct *tty)
  18. {
  19. schedule_delayed_work(&tty->flip.work, 1);
  20. }
  21. #undef _INLINE_
  22. #endif /* _LINUX_TTY_FLIP_H */