In article <bb**********************************@t54g2000hsg. googlegroups.com>,
<vi******@gmail.comwrote:
>Yep, and I'm pretty sure any support for hardware and software
interrupts are a compiler specific extension and not standard C.
>Well, signals are interrupts aren't they?
True in a sense, but probably not relevant to the OP's situation.
C's and Unix's signals are an abstraction of hardware interrupts.
When, say, a segmentation violation happens the processor gets an
interrupt, which is handled by the kernel. That handling may involve
calling a signal handler in the affected C program. But there is no
necessary relation between the calling convention used by the hardware
interrupt and that used by the resulting C signal. The call to the
signal handler is just like any other function call - or at least,
sufficiently like it that the signal handler can be used a a normal C
function, while the call to the interrupt handler probably uses a
quite different convention, probably a very minimal one that requires
the called function to save registers and so on.
-- Richard
--
:wq