On Sep 14, 2007, at 18:40:00, Heikki Orsila wrote:Actually you probably just want to do this with an ordinary single- threaded program. Just do your main() thing normally and schedule a signal-based timer at program start (or whenever you actually set up your periodic interrupt source); the timer signal-handler will act as the interrupt handler. Alternatively you could have 2 threads where the *only* thing the second thread does is a timed poll() loop on an FD where it reads commands from the main thread. When the main thread wants to change the interval-between-interrupts or some other interrupt configuration it writes the info down the FD to the alternate thread which actually sets up the change. The main program then continues running and periodically receives its SIGUSR1 or whatever from the other thread and uses that as the interrupt. Cheers, Kyle Moffett -
| Artem Bityutskiy | [PATCH 10/44 take 2] [UBI] debug unit implementation |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Trent Piepho | [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
| Dave Young | Re: Linux v2.6.24-rc1 |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Linus Torvalds | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Natalie Protasevich | [BUG] New Kernel Bugs |
