On Sunday 28 January 2001 02:20, Lex Spoon wrote:
I've patched the Unix VM so that any part of the VM -- including plugins -- may now register file descriptors to be checked with select() whenever ioRelinquishProcessor() is called. I also updated the XWindows, sound, and sockets modules to use this general mechanism instead of their own private one.
This is great! I wanted to change the serial model, as well; perhaps this will help.
It would be nice if the Windows VM could also do this, but unfortunately select() only works on sockets there (there is a different mechanism for async IO otherwise).
The immediate benefit is that sound events, too, will wake up ioRelinquishProcessor(). A smaller benefit is that several hacks such as soundPollFunction() and the extraFd argument to socketPollFunction() are removed.
soundPollFunction is in the sqXWindow.c diff; did you mean for it to be there?
+ /* check descriptors being watched */ + aioPoll(0); + + /* check sound explicitly */ + if(soundPollFunction) { + soundPollFunction(); + } + + + /* process all window events */ + while (HandleEvents()) ; +