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.
Huh? What exactly do you mean by the term "HAL"? If you're talking about the hardware abstraction layer, you don't integrate that in an application since it's already there, and as long as you stick to using the OS you are using it automatically (since, for example, you don't talk to the graphics adapter directly, you're using Xlib or whichever graphics library).
The fun can begin when (existing) libraries for accessing devices adopts HAL. The simplest use-case would be accessing a camera. The application programmer uses HAL for finding a camera device; he then tosses the HAL device id to the camera library and gets the pictures. In the process the application programmer is not concerned with any hardware specific parts of the device.
Other future applications of HAL include handling of pluggable storage, network-transparent device access, device ACL's, locking of devices etc. Right now we are working on the basics.
Originally posted by kamstrup [...]
Isn't that contradicting your claims Marius2 ?
No - actually the opposite is the case.
Maybe a small sketch may shed more light on this, we're talking of the following layers:
gamehacks application
|
|talks to, through standardized interfaces
V
X server (Xlib for example, that's the libs mentioned by Mr. Zeuthen)
|
|talks to, through its own interfaces
V
HAL
|
|talks to, through OS and implementation specific interfaces
V
driver
|
|talks to, through hw specific interfaces (=hw registers)
V
hardware
As you can see, an application would not talk to the HAL directly. Actually it would be a bad idea to do so (its very well possible, at least if you have the appropriate bindings), since the HAL may be implementation specific, that is: XFree86 HAL may be completely different from Xorg HAL (while the interfaces to application level are the same).
I did not say that Xlib can handle cameras (if it can, I'd rather
suspect the functionality to be in the X extensions). This was
just to illustrate the relation to Mr. Zeuthens remark.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.