LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-19-2005, 11:19 AM   #1
lordofring
Member
 
Registered: Feb 2005
Posts: 91

Rep: Reputation: 15
printk in the interrupt handler


Hello,

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

Thanks
 
Old 08-19-2005, 04:01 PM   #2
orgcandman
Member
 
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, 11:28 AM   #3
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,423

Rep: Reputation: 1158Reputation: 1158Reputation: 1158Reputation: 1158Reputation: 1158Reputation: 1158Reputation: 1158Reputation: 1158Reputation: 1158
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, 09:00 PM   #4
lordofring
Member
 
Registered: Feb 2005
Posts: 91

Original Poster
Rep: Reputation: 15
Thanks for everyone.
 
  


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


All times are GMT -5. The time now is 11:14 AM.

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