Writing Device Drivers

Driver Context

The driver context refers to the condition under which a driver is currently operating. The context limits the operations that a driver can perform. The driver context depends on the executing code that is invoked. Driver code executes in four contexts:

The manual pages in section 9F document the allowable contexts for each function. For example, in kernel context the driver must not call copyin(9F).