LinuxQuestions.org
Visit Jeremy's Blog.
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 11-02-2004, 04:40 AM   #1
sdimag
LQ Newbie
 
Registered: Sep 2004
Posts: 2

Rep: Reputation: 0
interrupts registrering


hello, I'm trying to register an interrupt handler. I'm running the following code:

i = 0;
while (i < 255)
{
printk(KERN_ERR MODULE_NAME ": i = %d.\n", i);
result = request_irq(i, irq_handler, 0, MODULE_NAME, (void *)(irq_handler));
if (result == 0)
{printk(KERN_ERR MODULE_NAME ": i = %d, request_irq succeeced. \n", i);
free_irq(i, NULL);}
else
printk(KERN_ERR MODULE_NAME ": i = %d, request_irq returned %d.\n", i, result);
i++;
}

I get the following output:
success: i = 4, 6, 9, 13
failures:
i< 16: request_irq() returns EBUSY (device or resource busy)
16 <= i < 224: request_irq() returns ENOSYS (function not implemented)
224 < i: request_irq() returns EINVAL (invalid argument)

The only thing I need is a way to intercept APIC interrupt (to allocate LVT entry). What can be wrong? Why can't I allocate LVT entry #153, for example?

I'm running SUSE 9.1, kernel 2.6.52 on Pentium-M machine

Thanks in advance for the replies
 
  


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
BIOS Interrupts Orkie Programming 3 04-22-2005 10:23 AM
about interrupts eshwar_ind Programming 1 02-25-2004 01:38 AM
High interrupts dunkyb Linux - General 4 12-29-2003 09:04 PM
Lost interrupts ardvark Linux - Hardware 9 08-08-2003 01:04 AM
Interrupts rhcohen Programming 0 01-22-2001 03:30 PM


All times are GMT -5. The time now is 08:20 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration