[Rpcemu] An idle loop?
tom at compton.nu
Sun Jan 31 16:13:06 PST 2010
On 31/01/10 20:15, Matthew Howkins wrote:
> I think the long-term ideal would be to have separate threads for IO
> devices that should wake up the CPU - keyboard, mouse, timers etc.
> Currently many of the IO devices hang off the main CPU emulation loop.
> We are working on tidying up the code for some of these devices -
> hopefully we can decouple them more easily later.
There's no real reason for needing separate threads, so long as things
like the mouse and keyboard either generate signals (which will
interrupt any sleep if done correctly) or are pollable via a file
descriptor (so that select can be used instead of sleep) then it should
be possible to sleep but wake up on any event that needs to be passed to
Tom Hughes (tom at compton.nu)
More information about the Rpcemu