LinuxQuestions.org
Help answer threads with 0 replies.
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 09-01-2006, 12:18 AM   #1
prabhakar_kushwaha
LQ Newbie
 
Registered: Oct 2005
Location: New Delhi
Posts: 26

Rep: Reputation: 15
genrating software interrupts


hi
i just want to generate a s/w interrupt on a perticular
intrrupt line from shell prompt..
that is
let i have registerd a interrupt line 8. now i want to genrate an interrupt on IRQ line 8 from shell prompt..
is it possible? if yes then how..?

with regards
 
Old 09-02-2006, 12:51 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
You're joking, right?
 
Old 09-02-2006, 04:02 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
There *might* be an architecture that allows such thing. An interrupt, however, is usually handled by separate hardware module which you don't program. It means you may try to cause a situation equivalent to that, but emulating it by, for example causing another interrupt to launch your code under specific circumstances.

If you want an 'phisical' interrupt, you need an electrical signal (high or low, depending on the architecture). If you have an connection that can generate it, it may be possible. You need a hardware possibility.
 
Old 09-02-2006, 08:41 PM   #4
prabhakar_kushwaha
LQ Newbie
 
Registered: Oct 2005
Location: New Delhi
Posts: 26

Original Poster
Rep: Reputation: 15
no i am not joking...
actually i have just writed a dummy driver...
and register a function on a specific IRQ line..
in order to run that function i want a signal to specfic IRQ line..
this is possible through assembly there is a command like INT 1
where 1 is the interrupt line which we want to genrate signal..

...is there any thing in shell prompt...

bye

Last edited by prabhakar_kushwaha; 09-02-2006 at 08:44 PM.
 
Old 09-03-2006, 03:16 AM   #5
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
I guess you're not joking ;-)

An "int 1" instruction has absolutely nothing to do with "IRQ 1".

No - as Mara said: if you want a physical interrupt, you need an electric signal. You can't do it from some magic shell command.

And I really can't imagine that you could possibly have written a driver without a better understanding of the difference between hardware interrupts, software interrupts, interrupt vectors ... and basically, some better concept of how computers work in general.

You could do worse that trying to learn some 80x86 assembly. Here's a good place to start:

http://www.faqs.org/faqs/assembly-la.../preamble.html

Good luck - I think you're going to need it!
 
Old 09-03-2006, 02:44 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
If you don't have the hardware connected at this time, try to launch the interrupt handler from some other place (for example another interrupt handler you can control). Definitely not shell.

When you're writing a driver it's very important to have the hardware. Different strange hardware-software effects can occur which you won't find out without testing the code in real conditions. Also, having the hardware you will be probably able to cause it to generate the interrupt, so you can easily test the code.
 
  


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
Interrupts rhcohen Programming 5 12-21-2017 11:25 AM
can i handle interrupts yugandhar Linux - General 1 06-13-2006 08:06 AM
genrating -2, -1, 1, 2 woth rand() hubabuba Programming 9 08-14-2005 01:59 PM
about interrupts eshwar_ind Programming 1 02-25-2004 12:38 AM
High interrupts dunkyb Linux - General 4 12-29-2003 08:04 PM

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

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