Time-Related Functions
Table B-25 Time-Related Functions
Function Name | Description |
ddi_get_lbolt | returns clock ticks since reboot |
ddi_get_time | return the current time in seconds |
delay | delay execution for a specified number of clock ticks |
drv_hztousec | convert clock ticks to microseconds |
drv_usectohz | convert microseconds to clock ticks |
drv_usecwait | busy-wait for specified interval |
gethrtime | get high-resolution time |
gethrvtime | get high-resolution LWP virtual time |
timeout | execute a function after a specified length of time |
untimeout | cancel previous timeout function call |
drv_getparm | ddi_get_lbolt, ddi_get_time |
Table B-26 Deprecated Time-Related Functions
Deprecated Function | Replacement |
drv_getparm | ddi_get_lbolt, ddi_get_time |
Power Management Functions
Table B-27 Power Management Functions
Function Name | Description |
ddi_removing_power | check if device loses power with DDI_SUSPEND |
pci_report_pmcap | report power management capability of a PCI device |
pm_busy_component | mark component as busy |
pm_idle_component | mark component as idle |
pm_raise_power | raise the power level of a component |
pm_lower_power | lower the power level of a component |
pm_power_has_changed | notify power management framework of autonomous power level change |
pm_trans_check | device power cycle advisory check |
Table B-28 Deprecated Power Management Functions
Function Name | Description |
ddi_dev_is_needed | inform the system that a device's component is required |
pm_create_components | see pm-components(9P) |
pm_destroy_components | see pm-components(9P) |
pm_get_normal_power | see pm-components(9P) |
pm_set_normal_power | see pm-components(9P) |
Kernel Statistics Functions
Table B-29 Kernel Statistics Functions
Function Name | Description |
kstat_create | create and initialize a new kstat |
kstat_delete | remove a kstat from the system |
kstat_install | add a fully initialized kstat to the system |
kstat_named_init | initialize a named kstat |
kstat_runq_back_to_waitq | record transaction migration from run queue to wait queue |
kstat_runq_enter | record transaction add to run queue |
kstat_runq_exit | record transaction removal from run queue |
kstat_waitq_enter | record transaction add to wait queue |
kstat_waitq_exit | record transaction removal from wait queue |
kstat_waitq_to_runq | record transaction migration from wait queue to run queue |
Kernel Logging and Printing Functions
Table B-30 Kernel Logging and Printing Functions
Function Name | Description |
cmn_err | display an error message |
vcmn_err | display an error message |
ddi_report_dev | announce a device |
strlog | submit messages to the log driver |
ddi_dev_report_fault | report a hardware failure |
scsi_errmsg | display a SCSI request sense message |
scsi_log | display a SCSI-device-related message |
scsi_vu_errmsg | display a SCSI request sense message |
Buffered I/O Functions
Table B-31 Buffered I/O Functions
Function Name | Description |
physio | perform physical I/O |
aphysio | perform asynchronous physical I/O |
anocancel | prevent cancellation of asynchronous I/O request |
minphys | limit physio buffer size |
biowait | suspend processes pending completion of block I/O |
biodone | release buffer after buffer I/O transfer and notify blocked threads |
bioerror | indicate error in buffer header |
geterror | return I/O error |
bp_mapin | allocate virtual address space |
bp_mapout | deallocate virtual address space |
disksort | single direction elevator seek sort for buffers |
getrbuf | get a raw buffer header |
freerbuf | free a raw buffer header |
biosize | returns size of a buffer structure |
bioinit | initialize a buffer structure |
biofini | uninitialize a buffer structure |
bioreset | reuse a private buffer header after I/O is complete |
bioclone | clone another buffer |
biomodified | check if a buffer is modified |
clrbuf | erase the contents of a buffer |
Virtual Memory Functions
Table B-32 Virtual Memory Functions
Function Name | Description |
ddi_btop | convert device bytes to pages (round down) |
ddi_btopr | convert device bytes to pages (round up) |
ddi_ptob | convert device pages to bytes |
btop | convert size in bytes to size in pages (round down) |
btopr | convert size in bytes to size in pages (round up) |
ptob | convert size in pages to size in bytes |
Table B-33 Deprecated Virtual Memory Functions
Deprecated Functions | Replacement |
hat_getkpfnum | see devmap(9e), ddi_dma_*_bind_handle, ddi_dma_nextcookie |
Device ID Functions
Table B-34 Device ID Functions
Function Name | Description |
ddi_devid_init | allocate a device id structure |
ddi_devid_free | free a device id structure |
ddi_devid_register | register a device id |
ddi_devid_unregister | unregister a device id |
ddi_devid_compare | compare two device ids |
ddi_devid_sizeof | return the size of a device id |
ddi_devid_valid | validate a device id |
ddi_devid_str_encode | encode a device id and minor_name into a null-terminated ASCII string; return a pointer to that string |
ddi_devid_str_decode | decode the device id and minor_name from a previously encoded string; allocate and return pointers to the extracted parts |
ddi_devid_str_free | free all strings returned by the ddi_devid functions |
|