[AD] linux io

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


this snippet of code is from src/linux/lasyncio.c:

/* async_io_event:
 *  A handler for the SIGIO signal.  It used to be inelegant, more
 *  optimised for speed, but I changed that because it was causing
 *  problems (mouse motion stopped the keyboard responding).
 */
static RETSIGTYPE async_io_event(int signo)
{
   if (std_drivers[STD_MOUSE]) std_drivers[STD_MOUSE]->update();
   if (std_drivers[STD_KBD]) std_drivers[STD_KBD]->update();
   if (user_sigio_hook) user_sigio_hook(SIGIO);
   return;
}



i stumbled on it quite a while ago searching why there was a big speed
difference in my program depending on whether the mouse was shown or not
(we're talking almost 10% speedup there).

i was considering trying to find a way to speed it up, but i don't know
what was here before. i guess this code was trying to get out of the
routine as soon as it found something to update. is this right ?

what did this code look like before ? (this unfortunately was before
the code was put on CVS).

Cheers

-- 
Lyrian 



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/