LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


Search this Thread
Old 08-19-2005, 10:19 AM   #1
Registered: Feb 2005
Posts: 91

Rep: Reputation: 15
printk in the interrupt handler


I'm wondering that, may I use printk in the interrupt handler in a linux device driver? If not, how do I debug?

Old 08-19-2005, 03:01 PM   #2
Registered: May 2002
Location: dracut MA
Distribution: Ubuntu; PNE-LE; LFS (no book)
Posts: 594

Rep: Reputation: 102Reputation: 102
depends on your interrupt handler implementation and how critical the timing will be. In general, your interrupt handlers shouldn't have logging/printing messages, nor should they do real meat of processing. That's up to the application/driver. The interrupt handler should just send back a notification that something happened.
Old 08-23-2005, 10:28 AM   #3
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,655

Rep: Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274Reputation: 1274
You can be certain that trying to print a message will require interruptions... and you can't do that in an interrupt-handler. All that the IH should do is to collect a minimal amount of status-information and schedule the subsequent back-end response. There really shouldn't be too much in the first-level interrupt handler that needs "debugging."
Old 08-23-2005, 08:00 PM   #4
Registered: Feb 2005
Posts: 91

Original Poster
Rep: Reputation: 15
Thanks for everyone.


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
Linux Interrupt Handler lucky6969b Linux - Software 1 12-01-2005 11:55 AM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 09:47 AM
Aiee, killing interrupt handler Hunter555 Linux - Software 0 09-07-2004 07:39 PM
Why this interrupt handler does not work? opereira Programming 1 03-04-2004 01:37 PM
Timer Interrupt Handler opereira Programming 1 03-03-2004 04:57 PM

All times are GMT -5. The time now is 01:14 PM.

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