LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-18-2011, 05:43 AM   #1
Soniferiel
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Rep: Reputation: 0
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?

Thanks a lot in advance for your help.
 
Old 02-18-2011, 03:57 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Soniferiel View Post
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.
Use SIGUSR1 and SIGUSR2 instead of SIGIO.
 
1 members found this post helpful.
Old 02-21-2011, 04:48 AM   #3
Soniferiel
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by David1357 View Post
Use SIGUSR1 and SIGUSR2 instead of SIGIO.
Hi David1357,

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?

Thanks for helping!
 
Old 02-21-2011, 09:15 AM   #4
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Soniferiel View Post
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?
That is exactly what I am suggesting.
 
1 members found this post helpful.
Old 02-23-2011, 03:34 AM   #5
Soniferiel
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by David1357 View Post
That is exactly what I am suggesting.
Ok, Thank you very much for your help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SIGIO sigaction wakes sleep up early bldrco Programming 2 07-09-2009 08:56 AM
using OpenVPN for specific application(s) amaj1407 Linux - Networking 10 07-05-2009 02:10 PM
Tip: Loading specific gtk theme for a specific application Su-Shee Linux - Desktop 0 05-22-2008 12:59 PM
Broadcast over multiple/specific NIC for wake on lan problem jakko Linux - Networking 1 04-02-2006 05:29 PM
How to turn Linux into a Specific application zbarnes Linux - Newbie 13 04-15-2005 01:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration