Interupt software creation and processing

can someone show me how to generate a software interrupt under Linux and then handle it with request_irq?

or it may not be possible.


source to share

1 answer

You can use softirq instead. You can define your sofirq by editing include / linux / interrupt.h. and then use the rasie_softirq () function instead of reuqest_irq (), which tells the kernel to handle the softirq. then the kernel will execute it in the appropriate software interrupt context.

API example

1. open_softwareirq();
2. raise_softirq();