Writing Device Drivers for Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Handling Resource Allocation Failures

The resource-allocation routines provide the driver with several options when handling allocation failures. The waitfp argument indicates whether the allocation routines block, return immediately, or schedule a callback, as shown in the following table.

Table 9-1  Resource Allocation Handling
waitfp value
Indicated Action
DDI_DMA_DONTWAIT
Driver does not want to wait for resources to become available
DDI_DMA_SLEEP
Driver is willing to wait indefinitely for resources to become available
Other values
The address of a function to be called when resources are likely to be available