[comp.sys.sun] Hidden hack in notifier

chuck@trantor.harris-atd.com (Chuck Musciano) (01/04/89)

People using eyecon have reported that every now and then, the eyes "lock
up" and stop tracking the mouse.  The only fix I had come across was to
increase the polling interval, reducing the smoothness of the eyes.  I
just stumbled across this interesting tidbit of code from clock.c, in the
suntools released source:

        struct  timeval c_tv;

        /* Utilize notifier hack to avoid stopped clock bug */
        c_tv = itimer.it_value;
        c_tv.tv_sec *= 2;
        notify_set_signal_check(c_tv);

The itimer is used to trigger the next clock tick.  This appears to me as
if the notify_set_signal_check routine establishes a maximum time limit
after which the notifer should check for any dropped or latent signals.
Notice that the timeout interval is twice the normal interrupt time, which
seems reasonable.  

This routine is not documented anywhere, nor is it mentioned in the .h
files.  If you pull up adb on any windowed tool, you find that the code
for notify_set_signal_check simply squirrels away the value of c_tv and
returns.

Has anyone used this routine?  Have official documentation on it?  Seems
to me that this is a handy way to ensure that your tool won't miss a
signal that it is expecting.

Chuck Musciano
Advanced Technology Department
Harris Corporation
(407) 727-6131
ARPA: chuck@trantor.harris-atd.com