Fixed high CPU usage.

This commit is contained in:
Armin Novak 2013-08-14 12:13:48 +02:00 committed by Bernhard Miklautz
parent 605f956486
commit 4a5b19e816

View File

@ -327,7 +327,7 @@ static void* serial_thread_func(void* arg)
while (1)
{
status = WaitForMultipleObjects(2, ev, FALSE, 10);
status = WaitForMultipleObjects(2, ev, FALSE, 1);
if (WAIT_OBJECT_0 == status)
break;
@ -336,7 +336,7 @@ static void* serial_thread_func(void* arg)
FD_ZERO(&serial->read_fds);
FD_ZERO(&serial->write_fds);
serial->tv.tv_sec = 1;
serial->tv.tv_sec = 0;
serial->tv.tv_usec = 0;
serial->select_timeout = 0;
@ -344,6 +344,7 @@ static void* serial_thread_func(void* arg)
{
if ((irp = (IRP*) Queue_Dequeue(serial->queue)))
serial_process_irp(serial, irp);
continue;
}
serial_check_fds(serial);