[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] mintlib wide character overhaul



On 02/22/13 15:58, Jeffrey Armstrong wrote:
On Fri, 22 Feb 2013, Eero Tamminen wrote:

*
https://github.com/ArmstrongJ/MiNTLib/commit/6d188b1f756a09382b80477a043f8e4b8749189c

Does usleep(1) sched_yield implementation allow other threads to be
scheduled?  Or is that small loop done in-process in usleep() for
performance reasons?


That's really an issue for the kernel itself. In theory, when a process sleeps, the kernel should recognize this and switch tasks. I'm guessing that a GNU/Linux sched_yield() implementation might do something fancier, but just going idle for a moment should allow the OS to switch tasks. I saw this simple solution in a few implementations for other alternative OSes.

FYI. I've just committed a real sched_yield() implementation to the mintlib.

Alan.