From: Brian J. <bjj...@us...> - 2001-08-06 19:30:55
|
--- Christian Bauer <cb...@st...> wrote: > > On Wed, Jul 18, 2001 at 01:16:37PM -0500, Brian Johnson wrote: > > It's quite slow. But I noticed that if I move the mouse > > constantly, it seems to speed up to its usual rate. Something to > > do with the new X event loop? > > Try switching the threaded vs. POSIX.4 timer 60Hz interrupt around > in unix_main.cpp. That didn't work so well: one_tick() takes the interrupt flag lock via SetInterruptFlag(), so whenever the thread servicing the timer interrupt happened to be holding the lock already (eg. via EmulOp()), BII would deadlock. I tried changing timer_event.sigev_notify from SIGEV_SIGNAL to SIGEV_THREAD, which should cause pthreads to start a new thread to run one_tick() when the timer expires. But I somehow ran into a segv with SIGSEGV blocked or ignored, making IRIX SIGKILL the process before dbx could get a look at it. I also tried using the threaded code, but rearranging the loop in tick_func() to look like the one in redraw_func(). That didn't change anything. As a hack, I tried calling one_tick() from redraw_func(), right after the video refresh. That changed the behavior: the cursor flashed at its "correct" rate when the mouse was still, but went faster than it should have when I moved the mouse around. The code in redraw_func() sure looks correct to me, no matter how long select() delays.... perhaps I'm getting bad values from GetTicks_usec()? On a whim, I tried hacking GetTicks_usec() to use gettimeofday() instead of clock_gettime(). No change. Brian J. Johnson -------------------------------------------------------------------- "mv emacs /vmunix" -- The future according to Michael Rawdon |