ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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..?
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.
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.
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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.