LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-30-2011, 08:59 AM   #1
getasif
LQ Newbie
 
Registered: Sep 2009
Posts: 26

Rep: Reputation: 0
How to achieve interrupt


how to achieve interrupts


any sources available apart from kernel code which show the usage of

void enable_irq(int irq);
void disable_irq(int irq);
void disable_irq_nosync(int irq);


thanks and regards

Last edited by getasif; 08-01-2011 at 06:55 AM. Reason: clarity
 
Old 08-01-2011, 12:53 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Quote:
Originally Posted by getasif View Post
how to achieve interrupts


any sources available apart from kernel code which show the usage of

void enable_irq(int irq);
void disable_irq(int irq);
void disable_irq_nosync(int irq);


thanks and regards
Most of the kernel is written for SMP systems.
If you have multiple CPUs, disable_irq doesn't protect you from another CPU running.
Most driver code uses spin_lock_irqsave and spin_lock_irq_restore instead.
Tutorial is here:
http://www.kernel.org/pub/linux/kern...ing/index.html
 
1 members found this post helpful.
Old 08-01-2011, 08:18 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
Obviously, there is no "code, apart from kernel code," that would ever use (or, could ever use...) these programming constructs.
 
1 members found this post helpful.
  


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
Panasonic printer without linux driver, how to enable printing sasicherukole Linux - Newbie 1 06-29-2009 12:23 PM
interrupt with push buttons through Linux - driver or user space? lila780 Linux - Newbie 1 12-30-2008 05:31 AM
Driver interrupt routine problem in Gentoo Linux briek Linux - Kernel 0 08-31-2006 11:57 AM
control is not going to interrupt handler when interrupt comes in serial driver sateeshalla Linux - Kernel 1 05-04-2006 09:43 AM

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

All times are GMT -5. The time now is 04:35 PM.

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