Fix example for GNU/Linux emulation.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2021-02-09 NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
* example-cdc-gnu-linux/sample.c (main): Handle timeout by canceling
|
||||
input.
|
||||
|
||||
* chopstx-gnu-linux.c (voluntary_context_switch): Fix for the case
|
||||
when chx_idle suggests no context switch (tp_prev == tp_next).
|
||||
|
||||
|
||||
@@ -179,7 +179,14 @@ main (int argc, const char *argv[])
|
||||
if (size < 0)
|
||||
goto connection_loop;
|
||||
|
||||
if (size == 1)
|
||||
if (size == 0)
|
||||
/* Timeout */
|
||||
{
|
||||
if (tty_send (tty, "\r\n", 2) < 0)
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
else if (size == 1)
|
||||
/* Do nothing but prompt again. */
|
||||
break;
|
||||
else if (size)
|
||||
|
||||
Reference in New Issue
Block a user