Blame view
include/linux/tty_flip.h
1.45 KB
1da177e4c Linux-2.6.12-rc2 |
1 2 |
#ifndef _LINUX_TTY_FLIP_H #define _LINUX_TTY_FLIP_H |
4d18e6eff tty: Enable confi... |
3 |
extern int tty_buffer_set_limit(struct tty_port *port, int limit); |
7bfe0b711 tty: Track flip b... |
4 |
extern int tty_buffer_space_avail(struct tty_port *port); |
227434f89 TTY: switch tty_b... |
5 |
extern int tty_buffer_request_room(struct tty_port *port, size_t size); |
2f6933571 TTY: convert more... |
6 7 8 9 10 11 |
extern int tty_insert_flip_string_flags(struct tty_port *port, const unsigned char *chars, const char *flags, size_t size); extern int tty_insert_flip_string_fixed_flag(struct tty_port *port, const unsigned char *chars, char flag, size_t size); extern int tty_prepare_flip_string(struct tty_port *port, unsigned char **chars, size_t size); |
2e124b4a3 TTY: switch tty_f... |
12 |
extern void tty_flip_buffer_push(struct tty_port *port); |
6732c8bb8 TTY: switch tty_s... |
13 |
void tty_schedule_flip(struct tty_port *port); |
33f0f88f1 [PATCH] TTY layer... |
14 |
|
92a19f9ce TTY: switch tty_i... |
15 |
static inline int tty_insert_flip_char(struct tty_port *port, |
e1a250902 [PATCH] make tty_... |
16 |
unsigned char ch, char flag) |
1da177e4c Linux-2.6.12-rc2 |
17 |
{ |
92a19f9ce TTY: switch tty_i... |
18 |
struct tty_buffer *tb = port->buf.tail; |
acc0f67f3 tty: Halve flip b... |
19 20 21 22 23 24 |
int change; change = (tb->flags & TTYB_NORMAL) && (flag != TTY_NORMAL); if (!change && tb->used < tb->size) { if (~tb->flags & TTYB_NORMAL) *flag_buf_ptr(tb, tb->used) = flag; |
1fc359fc3 tty: Compute flip... |
25 |
*char_buf_ptr(tb, tb->used++) = ch; |
33f0f88f1 [PATCH] TTY layer... |
26 |
return 1; |
1da177e4c Linux-2.6.12-rc2 |
27 |
} |
92a19f9ce TTY: switch tty_i... |
28 |
return tty_insert_flip_string_flags(port, &ch, &flag, 1); |
1da177e4c Linux-2.6.12-rc2 |
29 |
} |
05c7cd399 TTY: switch tty_i... |
30 31 |
static inline int tty_insert_flip_string(struct tty_port *port, const unsigned char *chars, size_t size) |
2832fc11f USB: tty: Add a f... |
32 |
{ |
05c7cd399 TTY: switch tty_i... |
33 |
return tty_insert_flip_string_fixed_flag(port, chars, TTY_NORMAL, size); |
2832fc11f USB: tty: Add a f... |
34 |
} |
a7c8d58c7 tty: Fix unsafe v... |
35 36 |
extern void tty_buffer_lock_exclusive(struct tty_port *port); extern void tty_buffer_unlock_exclusive(struct tty_port *port); |
1da177e4c Linux-2.6.12-rc2 |
37 |
#endif /* _LINUX_TTY_FLIP_H */ |