How do you simulate interrupts in Mom. IDE?

Hi,
Could somebody please tell me how to deliver a SIGEV_INTR signal to simulate a thread receiving an interrupt on the parallel port (in the IDE)? I have a thread that waits until it receives an interrupt and I want to test without actually connecting my hardware. Where can I find a register/setting to change, to make it appear as though an interrupt was received from the parallel port, therefore allowing the thread to run?
Also during recent runs, the program has received a SIG_INT from “somewhere” that allowed my blocked thread to run. As the hardware was not connected, could somebody please offer an explanation as to how this might happen?
Thanks! :unamused:

Well - the easiest thing to do is to hook to interrupt #0, the system timer interrupt. You will get an interrupt every 1ms.

Thanks, that’s a good idea. Is there any other method? If I tie the routine to interrupt 0 how will I trace the program if it interrupts every 1ms? (Or is that a stupid question because I will be able to follow through the interrupt routine before the next one is serviced?). Why does my debugger occasionally tell me “SIGINT - meaning an interrupt was received” when nothing has happened? It makes things a little difficult from a reliability point of view…!

SIGINT is a signal - like SIGSEGV or SIGBUS. There are various ways in which a SIGINT can be sent to a process. But it isn’t an interrupt in terms of a HARDWARE interrupt. It is all software.

The other way to simulate the interrupts is to use message passing. Have a process who’s job it is to send your driver pulses on request. When your driver gets the pulse he does the work he would do on an interrupt. Look into MsgDeliverEvent().

TO CDM: One question more: if i have two threads hanging on InterruptWait is there any way to send this event (interrupt event) to specific thread (for example not to first called this function).
Thanks in advance.

If you’re hooking your device to parallel port, you can as well hook your ISR to prallel port IRQ and then send the interuupt by setting the IRQ pin low/high.