Several Basic concepts that should be paid special attention to when writing drivers
Source: Internet
Author: User
Several Basic concepts that should be paid special attention to when writing drivers-Linux general technology-Linux programming and kernel information. The following is a detailed description. Linux Device Driver
When writing drivers, programmers should pay special attention to this basic concept: Writing kernel code to access hardware, but not imposing special policies on users, because different users have different requirements. the driver should make the hardware available and leave everything about how to use the hardware to the application. A driver, in this way, is flexible. If it provides access to hardware capabilities, there is no additional constraint. however, sometimes some policy decisions must be made.
From another perspective, the driver is a software layer that exists between the application and the actual device. the privileged role of the driver allows the driver programmer y to strictly choose how the device should behave: different drivers can provide different capabilities, or even the same device. the actual drive design should be balanced among many different considerations.
There are some typical features of transparent policy driving. these include the ability to support synchronous and asynchronous operations that can be opened multiple times. The full capability of the hardware does not have the software layer to "simplify things" or provide policy-related operations. this kind of driver is not only easy for their end users, but also proved to be easy to maintain. for software designers, it is a common goal to make the driver transparent.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service