Writing Device Drivers for Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Storage Classes of Driver Data

The storage class of data is a guide to whether the driver might need to take explicit steps to control access to the data. The three data storage classes are:

  • Automatic (stack) data. Every thread has a private stack, so drivers never need to lock automatic variables.

  • Global static data. Global static data can be shared by any number of threads in the driver. The driver might need to lock this type of data at times.

  • Kernel heap data. Any number of threads in the driver can share kernel heap data, such as data allocated by kmem_alloc(9F). The driver needs to protect shared data at all times.