How to wake up my application unless a specific SIGIO happens?
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to wake up my application unless a specific SIGIO happens?
Hello,
I'm using a driver for a pci UART device that handles both serial ports and GPIO's by interruption.
At the application level I will have two applications one which will handles only the GPIO part and the other which will handles only the serial port communication, so I wan't my GPIO application to be awaken only if the source of the interrupt is GPIO and respectively the serial port application to be awaken only when the source of the interrupt is from a serial port.
From what I understand if I use SIGIO, my applications will be awaken for the 2 kinds of interrupts and they will have to find out if they are concerned by the interrupt. But I don't want applications to have to test if they are concerned by the interrupt.
Is there a way to do such a thing? I looked how SIGUSR signals are used but I didn't find out if they are applicable in my case?
At the application level I will have two applications one which will handles only the GPIO part and the other which will handles only the serial port communication, so I wan't my GPIO application to be awaken only if the source of the interrupt is GPIO and respectively the serial port application to be awaken only when the source of the interrupt is from a serial port.
First thanks a lot for your reply. Can you tell me if I'm understanding right: Does it mean that the interrupt handler of my device driver have to send a SIGUSR1 if the interrupt source is from a serial port and a SIGUSUR2 if the interrupt source is GPIO?
Can you tell me if I'm understanding right: Do you mean that the interrupt handler of my device driver should send a SIGUSR1 if the interrupt source is from a serial port and a SIGUSUR2 if the interrupt source is GPIO?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.