From: Rob Landley Date: Thu, 16 Oct 2008 06:34:10 +0000 (-0000) Subject: Confirmed that on Linux the serial interrupt takes precedence over the timer X-Git-Tag: 1_13_0~104 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7960ea8918c601c6f5c35f50a118a51ca0fbea84;p=oweals%2Fbusybox.git Confirmed that on Linux the serial interrupt takes precedence over the timer interrupt, so we don't need to worry about scheduler delays. This means the delay can be trimmed down to 25 miliseconds. Add comment while at it. --- diff --git a/editors/vi.c b/editors/vi.c index 75e158cfc..a75735945 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -2280,8 +2280,9 @@ static char readit(void) // read (maybe cursor) key from stdin struct pollfd pfd; pfd.fd = 0; pfd.events = POLLIN; - // Rob needed 300ms timeout on qemu - if (safe_poll(&pfd, 1, /*timeout:*/ 300)) { + // Timeout is needed to reconnect escape sequences split + // up by transmission over a serial console. + if (safe_poll(&pfd, 1, 25)) { if (safe_read(0, readbuffer + n, 1) <= 0) goto error; n++;