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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-05-2005, 01:42 AM
|
#1
|
Member
Registered: May 2005
Posts: 46
Rep:
|
Interrupt routine...
G'Day,
This is probably a pretty simple question, but I was not quite sure of the answer. In brief, can you write an interrupt routine in user space?
I have a bit of hardware (1-wire interface) that, due to a bug, must be interrupt driven; if possible I would like to have my user-space program (alone) transmit data, wait for an interrupt, then request data, interrupt, etc. All the routine would need to do is set a gobal variable or something --- it is so that I know the transfer is complete.
If it is not possible, I shall have to look into how I can do something else from kernel; if it is possible, any basic advice (or useful reading) would be appreciated.
|
|
|
07-05-2005, 06:44 PM
|
#2
|
Member
Registered: Aug 2003
Location: Vancouver, Canada
Distribution: RH, SL
Posts: 37
Rep:
|
I'm not an expert, but I believe the short answer is no.
Signals are definitely kernel-level programming.
Every other OS I have programmed has required system level programming to create a true interrupt.
Apparently the following book is quite good for Linux hardware programming, our lab was able to write a couple of device drivers using it.
Title: Linux Device Drivers
Author: Jonathan Corbet, Alessandro Rubini, Greg Greg Kroah-Hartman
Format: Trade Paperback · Published: February 2005
Dimensions: 608 Pages, 7 x 9 in
ISBN: 0596005903 · Published by O'reilly
Good luck!
|
|
|
07-05-2005, 08:11 PM
|
#3
|
Member
Registered: May 2005
Posts: 46
Original Poster
Rep:
|
Thanks for the reply!
I was afraid that may be the answer, but I was kind of hoping I may be able to take the easy way out. The last time I wrote an interrupt routine, I could include it in my standard program... but that chip did not have an OS, so there was no other way to do it  It will take longer like this, but I imagine the end product *would* be better: thanks again!
|
|
|
All times are GMT -5. The time now is 06:15 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|