diff options
author | nicm <nicm> | 2015-05-12 22:40:38 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-05-12 22:40:38 +0000 |
commit | 3f4ee98162cd5bb7000f93fec0e631e123b1281d (patch) | |
tree | 07d42ed7718f737c364d5afc9d825a4e553c81d7 /tmux.h | |
parent | 37ae8a9e0fc2cd7ab2387a9a762a39dc0ff6723c (diff) | |
download | rtmux-3f4ee98162cd5bb7000f93fec0e631e123b1281d.tar.gz rtmux-3f4ee98162cd5bb7000f93fec0e631e123b1281d.tar.bz2 rtmux-3f4ee98162cd5bb7000f93fec0e631e123b1281d.zip |
To replace c0-*, add a high watermark to the pty event, and also backoff
when the any of the ttys the pane is going to write to has buffered
enough data.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -56,6 +56,16 @@ extern char **environ; */ #define UTF8_SIZE 9 +/* + * READ_SIZE is the maximum size of data to hold from a pty (the event high + * watermark). READ_BACKOFF is the amount of data waiting to be output to a tty + * before pty reads will be backed off. READ_TIME is how long to back off + * before the next read (in microseconds) if a tty is above READ_BACKOFF. + */ +#define READ_SIZE 1024 +#define READ_BACKOFF 512 +#define READ_TIME 100 + /* Fatal errors. */ #define fatal(msg) log_fatal("%s: %s", __func__, msg); #define fatalx(msg) log_fatalx("%s: %s", __func__, msg); @@ -847,6 +857,7 @@ struct window_pane { int fd; struct bufferevent *event; + struct event timer; struct input_ctx *ictx; @@ -1595,8 +1606,9 @@ void tty_draw_line(struct tty *, const struct window_pane *, struct screen *, int tty_open(struct tty *, char **); void tty_close(struct tty *); void tty_free(struct tty *); -void tty_write( - void (*)(struct tty *, const struct tty_ctx *), struct tty_ctx *); +void tty_write(void (*)(struct tty *, const struct tty_ctx *), + struct tty_ctx *); +int tty_client_ready(struct client *, struct window_pane *wp); void tty_cmd_alignmenttest(struct tty *, const struct tty_ctx *); void tty_cmd_cell(struct tty *, const struct tty_ctx *); void tty_cmd_clearendofline(struct tty *, const struct tty_ctx *); |