LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-06-2012, 05:06 AM   #1
nakul
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Rep: Reputation: 0
Registering two handler for one intrrupt


hi all,

I am using C language and wanted to know whether it is possible to register two different handlers for the same intrrupt. If yes, than what we will be the system behavior.

Thanks
 
Old 12-06-2012, 06:48 AM   #2
evgenyz
Member
 
Registered: Sep 2012
Posts: 48

Rep: Reputation: Disabled
Can I ask you why you need 2 handlers for same interrupt?
 
Old 12-07-2012, 12:02 AM   #3
nakul
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Original Poster
Rep: Reputation: 0
hi,

Actually we are trying to port 'Udhcpc' to our embedded linux application. But in source code of Udhcp, we've found that it has registered some interrupts with its handlers, which was already been registered by our application. Thus i had doubt about such scenerios.
 
Old 12-07-2012, 04:09 AM   #4
evgenyz
Member
 
Registered: Sep 2012
Posts: 48

Rep: Reputation: Disabled
I don't think it's possible. Just add you code to existent handler.
 
Old 12-07-2012, 08:18 AM   #5
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,320

Rep: Reputation: 252Reputation: 252Reputation: 252
Are you speaking here of hardware interrupts or signals?
 
Old 12-07-2012, 08:42 AM   #6
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,401

Rep: Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119
The first-level interrupt handler can launch more than one second-level response to it, depending on the situation and architecture. Most commonly the second level response is a chain of subroutine-calls.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to replace the default handler with user defined handler in Linux kernel ? vl chowdary Linux - Kernel 4 04-27-2011 02:09 PM
SIGSEGV handler (segmentation fauld handler) myp Programming 8 03-08-2011 02:17 PM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 09:47 AM


All times are GMT -5. The time now is 11:15 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration