I'm developing a DSPLink application for an OMAP-based target. The DSP core, running DSP/BIOS does all the real work, while the ARM core, running Linux does performance monitoring, and implements a UI. I have a problem on the ARM Linux side...
My UI makes use of a POSIX timer (timer_create, timer_settime calls) to deliver a signal. I'm using (SIGRTMIN + 3) as my timer signal. You'll note that this is not one of the signals standardly caught by DSPLink. I can compile the UI code two ways: into a test shell that is just the UI, doesn't link with DSPLink, and doesn't do anything but provide a mockup of the UI, or into the full application that links with DSPLink and loads, runs, and monitors the DSP code image.
When I compile the UI into a test shell, I get my timer signal, and the UI works. When I compile the UI into the full DSPLink application, I do not get my timer signal. Same UI code. All the system calls setting up the POSIX timer, setting up the signal handler, etc, all succeed, but mysteriously the signal is just not delivered to my application. I've even taken an strace of both the UI test shell and the full application. As far as timers and signals go, they look identical except that the (SIGRTMIN + 3) signal just plain never arrives to the full application. The strace of the full application shows that nothing but my UI code is referencing that signal for anything. So I'm stumped as to how the signal just fails to arrive.
I added a debug function to print out: 1) is the signal blocked? 2) is the signal pending? 3) what's the handler registered for the signal? 4) is the timer running or expired? 5) is the flag that my signal handler sets set or cleared? I hooked the debug function to a key and press the key twice, once before the timer is supposed to have expired, and once after. Results:
Before: not blocked, not pending, handler is my UI code signal handler, timer running, flag cleared.
After: not blocked, not pending, handler is my UI code signal handler, timer expired, flag cleared.
It's like the Linux kernel itself is swallowing my signal, and allowing the timer to expire without any notification. Again, trace of UI test shell shows (SIGRTMIN + 3) arriving. Trace of full application does not. And it only happens when I link in DSPLink.
I'm stumped. I'd appreciate any thoughts anyone has.