world leader in high performance signal processing
Trace:

Differences

This shows you the differences between two versions of the page.

introduction_to_device_drivers [2005/08/12 20:42]
philwil
introduction_to_device_drivers [2006/12/08 01:02] (current)
Line 18: Line 18:
  
 Network drivers have a different structure and are closely connected with the network stacks that can be built into the kernel. They use ports and sockets to route data packets within, as well as to and from the system. Network drivers have a different structure and are closely connected with the network stacks that can be built into the kernel. They use ports and sockets to route data packets within, as well as to and from the system.
-   
  
 The user is normally not allowed to execute kernel code or access Input/Output (I/O) devices. The user is normally not allowed to execute kernel code or access Input/Output (I/O) devices.
 When this functionality is required an application should use a device driver. When this functionality is required an application should use a device driver.
-They are quite easy to build and very fast to run so consider creating a device driver for all your io+They are quite easy to build and very fast to run so consider creating a device driver for all your I/O
 needs. needs.
-   + 
-A device driver can be a module or it can be statically linked into the kernel +A device driver can be a module or it can be statically linked into the kernel
 An appropriate kernel registration function is executed during the module init process.  An appropriate kernel registration function is executed during the module init process. 
  
Line 31: Line 30:
  
 This function passes pointers to one or more functions internal to This function passes pointers to one or more functions internal to
-the driver and may includes some other parameters.+the driver and may include some other parameters.
  
-A device driver will register the following components+A device driver will register the following components:
  
  
Line 42: Line 41:
  
  
-Special files called **device nodes** are created on a file system that hold the class, major and +Special files called **device nodes** are created on a file system that hold the class, Major and 
-minor number of a particular device.+Minor number of a particular device.
  
 The device driver registers a number of **callback** functions that are used to extend the default behaviour The device driver registers a number of **callback** functions that are used to extend the default behaviour
 of the kernel when accessing these **device nodes**. These functions are recorded in a **file operations** table. of the kernel when accessing these **device nodes**. These functions are recorded in a **file operations** table.
  
-The **open** system call retrieves that Major number and then looks for a device registered by the major number+The **open** system call retrieves that Major number and then looks for a device registered by the Major number
 in the device table to recover the fops table for the device. in the device table to recover the fops table for the device.
  
-This information is then recorded in a special **per process** table called +This information is then recorded in a special **per process** table called the file descriptor table. The process uses simple integer index (fd) to access the file descripter table entry after it has been opened.
-the file descriptor table. The process uses an simple integer index (fd) to access the file descripter table entry after it has been opened.+
  
 [../images/ddfig1.gif] [../images/ddfig1.gif]
 +FIXME