4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 12:59:21 +08:00

Cygwin: select: Improve select/poll response.

This commit is contained in:
Takashi Yano 2021-08-27 19:54:41 +09:00 committed by Corinna Vinschen
parent 8a10f6302c
commit b75d855fb0

View File

@ -735,6 +735,7 @@ thread_pipe (void *arg)
select_pipe_info *pi = (select_pipe_info *) arg;
DWORD sleep_time = 0;
bool looping = true;
DWORD t0 = GetTickCount ();
while (looping)
{
@ -754,7 +755,12 @@ thread_pipe (void *arg)
break;
cygwait (pi->bye, sleep_time >> 3);
if (sleep_time < 80)
++sleep_time;
{
DWORD t1 = GetTickCount ();
if (t0 != t1)
++sleep_time;
t0 = t1;
}
if (pi->stop_thread)
break;
}
@ -930,6 +936,7 @@ thread_fifo (void *arg)
select_fifo_info *pi = (select_fifo_info *) arg;
DWORD sleep_time = 0;
bool looping = true;
DWORD t0 = GetTickCount ();
while (looping)
{
@ -949,7 +956,12 @@ thread_fifo (void *arg)
break;
cygwait (pi->bye, sleep_time >> 3);
if (sleep_time < 80)
++sleep_time;
{
DWORD t1 = GetTickCount ();
if (t0 != t1)
++sleep_time;
t0 = t1;
}
if (pi->stop_thread)
break;
}
@ -1125,6 +1137,7 @@ thread_console (void *arg)
select_console_info *ci = (select_console_info *) arg;
DWORD sleep_time = 0;
bool looping = true;
DWORD t0 = GetTickCount ();
while (looping)
{
@ -1144,7 +1157,12 @@ thread_console (void *arg)
break;
cygwait (ci->bye, sleep_time >> 3);
if (sleep_time < 80)
++sleep_time;
{
DWORD t1 = GetTickCount ();
if (t0 != t1)
++sleep_time;
t0 = t1;
}
if (ci->stop_thread)
break;
}
@ -1364,6 +1382,7 @@ thread_pty_slave (void *arg)
select_pipe_info *pi = (select_pipe_info *) arg;
DWORD sleep_time = 0;
bool looping = true;
DWORD t0 = GetTickCount ();
while (looping)
{
@ -1383,7 +1402,12 @@ thread_pty_slave (void *arg)
break;
cygwait (pi->bye, sleep_time >> 3);
if (sleep_time < 80)
++sleep_time;
{
DWORD t1 = GetTickCount ();
if (t0 != t1)
++sleep_time;
t0 = t1;
}
if (pi->stop_thread)
break;
}