On 16 Jun, [EMAIL PROTECTED] shouted:
-> Raster sayeth:
-> > itimer interrupts with a timer queue system
-> [snip]
->
-> That sounds way complicated; what about something like:
->
-> while(1) {
-> for (i=0;i<MAX_DISPLAYS;i++) {
-> iface = GetIfaceFunction(i);
-> if (iface && (XPending(iface->display))) {
-> XNextEvent(iface->display,&event);
-> switch(event.type) {
-> /* etc */
-> }
-> } else {
-> /* check for expired timers */
-> ...
thsi wont work:
iw will sit at 100% load in an endless loop if no events are around
polling the timer queue to see what has to be done.. otherwise it may
get to the check for expired timers - if there are none sleep(); but
not proces any events tiltl he sleep(): is over - basically XNextEvent
realtime isnt 100% necessary my other system wasnt perfectly real-time
but assuming handling the result of an event doen take long iits pretty
close enough for my needs. Basically if there is no events happening
and no timers stuff to handle th eprogram shoudl sit and block -
perhaps handle other events untilt he timer expires...
-> Avoids multiple threads, but drops timer-based things from "real-time" to
-> "when-I-get-around-to-it-time". But is that such a bad trade-off? And
-> aren't you supposed to avoid a whole lotta work in a signal handler?
->
-> Disclaimer: I dunno if that even works (I think it's on the Master
-> Programmer's test, tho ;-)
->
-> jim
--
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
[EMAIL PROTECTED] /\___ /\ ___/||\___ ____/|/\___ [EMAIL PROTECTED]
Carsten Haitzler | _ //__\\ __||_ __\\ ___|| _ / Red Hat Advanced
218/21 Conner Drive || // __ \\_ \ | | \ _/_|| / Development Labs
Chapel Hill NC 27514 USA ||\\\/ \//__/ |_| /___/||\\ 919 547 0012 ext 282
+1 (919) 929 9443, 801 4392 For pure Enlightenmenthttp://www.rasterman.com/
-
To unsubscribe from this list send mail to: [EMAIL PROTECTED]
with the message contents: unsubscribe e-develop