mirror of https://github.com/ARMmbed/mbed-os.git
Make poll() use wait(1) rather than yield()
Spinning while polling is overly CPU intensive, and inconsistent with the current blocking behaviour of UARTSerial. Change to use Thread::wait(1) to match UARTSerial.pull/5216/head
parent
b18332cb4d
commit
de4ced33a6
|
|
@ -66,7 +66,7 @@ int poll(pollfh fhs[], unsigned nfhs, int timeout)
|
|||
#ifdef MBED_CONF_RTOS_PRESENT
|
||||
// TODO - proper blocking
|
||||
// wait for condition variable, wait queue whatever here
|
||||
rtos::Thread::yield();
|
||||
rtos::Thread::wait(1);
|
||||
#endif
|
||||
}
|
||||
return count;
|
||||
|
|
|
|||
Loading…
Reference in New Issue