LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Are you speaking here of hardware interrupts or signals?
 
Old 12-07-2012, 08:42 AM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,647
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
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



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:59 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