[PLUG] Asynchronous Notification

Aditya Godbole aag.lists at gmail.com
Mon Mar 9 18:18:44 IST 2009


On 3/7/09, paras <beparas at gmail.com> wrote:
> Hi all,
>  I am working on linux kernel-2.6.20.
>  I write one kernel module for GPIO.
>  In my module, I am generating an interrupt when the status of GPIO pin (e.g
>  GPIP 3) changes. its works properly.
>  Then I am using Asynchronous Notification to get notification of interrupt
>  in my user space process.
>  For that I used fasync method. kill_fasync() called in interrupt handler of
>  gpio.
>  According to Linux Device Driver Book, kill_fasync is used to signal the
>  interested processes when data arrives.
>
>  So my problem is, I am changing the status of gpio pin twice, according to
>  documentation I will get SIGIO signal twice.
>  But It don't happen so, I got SIGIO only once.

I'm assuming you are checking the state correctly, ie, the interrupt
handler gets invoked on both state changes. If not, then you need to
check the hardare interrupt controller configuration.
If the IRQ handler is getting called correctly, then check whether the
userspace handler has a policy of dropping pending signals when the
handler is getting executed. Can you print out logs at the point when
a signal is added to the pending queue of the process?

-aditya




More information about the Plug-mail mailing list