Revert "Cygwin: select: Improve select/poll response."
... because this commit (23bb19ef) causes high CPU load.
This commit is contained in:
parent
99be238347
commit
b07660ac19
|
@ -726,7 +726,6 @@ thread_pipe (void *arg)
|
||||||
select_pipe_info *pi = (select_pipe_info *) arg;
|
select_pipe_info *pi = (select_pipe_info *) arg;
|
||||||
DWORD sleep_time = 0;
|
DWORD sleep_time = 0;
|
||||||
bool looping = true;
|
bool looping = true;
|
||||||
DWORD t0 = GetTickCount ();
|
|
||||||
|
|
||||||
while (looping)
|
while (looping)
|
||||||
{
|
{
|
||||||
|
@ -746,12 +745,7 @@ thread_pipe (void *arg)
|
||||||
break;
|
break;
|
||||||
cygwait (pi->bye, sleep_time >> 3);
|
cygwait (pi->bye, sleep_time >> 3);
|
||||||
if (sleep_time < 80)
|
if (sleep_time < 80)
|
||||||
{
|
|
||||||
DWORD t1 = GetTickCount ();
|
|
||||||
if (t0 != t1)
|
|
||||||
++sleep_time;
|
++sleep_time;
|
||||||
t0 = t1;
|
|
||||||
}
|
|
||||||
if (pi->stop_thread)
|
if (pi->stop_thread)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -927,7 +921,6 @@ thread_fifo (void *arg)
|
||||||
select_fifo_info *pi = (select_fifo_info *) arg;
|
select_fifo_info *pi = (select_fifo_info *) arg;
|
||||||
DWORD sleep_time = 0;
|
DWORD sleep_time = 0;
|
||||||
bool looping = true;
|
bool looping = true;
|
||||||
DWORD t0 = GetTickCount ();
|
|
||||||
|
|
||||||
while (looping)
|
while (looping)
|
||||||
{
|
{
|
||||||
|
@ -947,12 +940,7 @@ thread_fifo (void *arg)
|
||||||
break;
|
break;
|
||||||
cygwait (pi->bye, sleep_time >> 3);
|
cygwait (pi->bye, sleep_time >> 3);
|
||||||
if (sleep_time < 80)
|
if (sleep_time < 80)
|
||||||
{
|
|
||||||
DWORD t1 = GetTickCount ();
|
|
||||||
if (t0 != t1)
|
|
||||||
++sleep_time;
|
++sleep_time;
|
||||||
t0 = t1;
|
|
||||||
}
|
|
||||||
if (pi->stop_thread)
|
if (pi->stop_thread)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1128,7 +1116,6 @@ thread_console (void *arg)
|
||||||
select_console_info *ci = (select_console_info *) arg;
|
select_console_info *ci = (select_console_info *) arg;
|
||||||
DWORD sleep_time = 0;
|
DWORD sleep_time = 0;
|
||||||
bool looping = true;
|
bool looping = true;
|
||||||
DWORD t0 = GetTickCount ();
|
|
||||||
|
|
||||||
while (looping)
|
while (looping)
|
||||||
{
|
{
|
||||||
|
@ -1148,12 +1135,7 @@ thread_console (void *arg)
|
||||||
break;
|
break;
|
||||||
cygwait (ci->bye, sleep_time >> 3);
|
cygwait (ci->bye, sleep_time >> 3);
|
||||||
if (sleep_time < 80)
|
if (sleep_time < 80)
|
||||||
{
|
|
||||||
DWORD t1 = GetTickCount ();
|
|
||||||
if (t0 != t1)
|
|
||||||
++sleep_time;
|
++sleep_time;
|
||||||
t0 = t1;
|
|
||||||
}
|
|
||||||
if (ci->stop_thread)
|
if (ci->stop_thread)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1373,7 +1355,6 @@ thread_pty_slave (void *arg)
|
||||||
select_pipe_info *pi = (select_pipe_info *) arg;
|
select_pipe_info *pi = (select_pipe_info *) arg;
|
||||||
DWORD sleep_time = 0;
|
DWORD sleep_time = 0;
|
||||||
bool looping = true;
|
bool looping = true;
|
||||||
DWORD t0 = GetTickCount ();
|
|
||||||
|
|
||||||
while (looping)
|
while (looping)
|
||||||
{
|
{
|
||||||
|
@ -1393,12 +1374,7 @@ thread_pty_slave (void *arg)
|
||||||
break;
|
break;
|
||||||
cygwait (pi->bye, sleep_time >> 3);
|
cygwait (pi->bye, sleep_time >> 3);
|
||||||
if (sleep_time < 80)
|
if (sleep_time < 80)
|
||||||
{
|
|
||||||
DWORD t1 = GetTickCount ();
|
|
||||||
if (t0 != t1)
|
|
||||||
++sleep_time;
|
++sleep_time;
|
||||||
t0 = t1;
|
|
||||||
}
|
|
||||||
if (pi->stop_thread)
|
if (pi->stop_thread)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue