aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2008-10-16 06:34:10 +0000
committerRob Landley <rob@landley.net>2008-10-16 06:34:10 +0000
commit7960ea8918c601c6f5c35f50a118a51ca0fbea84 (patch)
tree82080763d5b60275947f2da037c16759278e178f
parent8854b352f4a0f088a222adccfda1dca345e8dc6b (diff)
downloadbusybox-w32-7960ea8918c601c6f5c35f50a118a51ca0fbea84.tar.gz
busybox-w32-7960ea8918c601c6f5c35f50a118a51ca0fbea84.tar.bz2
busybox-w32-7960ea8918c601c6f5c35f50a118a51ca0fbea84.zip
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.
-rw-r--r--editors/vi.c5
1 files changed, 3 insertions, 2 deletions
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
2280 struct pollfd pfd; 2280 struct pollfd pfd;
2281 pfd.fd = 0; 2281 pfd.fd = 0;
2282 pfd.events = POLLIN; 2282 pfd.events = POLLIN;
2283 // Rob needed 300ms timeout on qemu 2283 // Timeout is needed to reconnect escape sequences split
2284 if (safe_poll(&pfd, 1, /*timeout:*/ 300)) { 2284 // up by transmission over a serial console.
2285 if (safe_poll(&pfd, 1, 25)) {
2285 if (safe_read(0, readbuffer + n, 1) <= 0) 2286 if (safe_read(0, readbuffer + n, 1) <= 0)
2286 goto error; 2287 goto error;
2287 n++; 2288 n++;