I want my program to keep a rough awareness of time passing, so I can
schedule certain events every so often.  I don't want to poll the clock, so
I choose to have an interrupt that increments a counter.  This has always
served well in microprocessors, and as this is an embedded linux app, I want
to do the same thing here.  So I pull out the API reference, the book that
started LPSG, "Linux Application Development" and start reading.

There is an interval timer for this; it uses SIGALRM, and, it is pointed out
most everywhere you look, this interferes with the alarm() system call, and
by indirection, the sleep() call.  

I use an empty select() to do time delays.  I'm hoping to use a more useful
form of select() in the future to eliminate any I/O delays (and the rest are
debug trace visual aids).

I tried to verify that pausing using an empty select() doesn't get
interfered with by SIGALRM.  It apparently is OK, but "nobody said
otherwise" isn't the sort of proof I like.   So the first question is
whether these two functions play nice with each other.

The second question is in the next message.



-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to