Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
B.  Summary of Solaris 9 DDI/DKI Services Introduction User Application Kernel and Device Access Functions  Previous   Contents   Next 
   
 

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

SCSI Functions

Table B-35 SCSI Functions

Function Name

Description

scsi_probe

probe a SCSI device

scsi_unprobe

free resources allocated during initial probing

scsi_alloc_consistent_buf

allocate an I/O buffer for SCSI DMA

scsi_free_consistent_buf

free a previously allocated SCSI DMA I/O buffer

scsi_init_pkt

prepare a complete SCSI packet

scsi_destroy_pkt

free an allocated SCSI packet and its DMA resource

scsi_setup_cdb

setup SCSI command descriptor block (CDB)

scsi_transport

start a SCSI command

scsi_poll

run a polled SCSI command

scsi_ifgetcap

get SCSI transport capability

scsi_ifsetcap

set SCSI transport capability

scsi_sync_pkt

synchronize CPU and I/O views of memory

scsi_abort

abort a SCSI command

scsi_reset

reset a SCSI bus or target

scsi_reset_notify

notify target driver of bus resets

scsi_cname

decode a SCSI command

scsi_dname

decode a SCSI peripheral device type

scsi_mname

decode a SCSI message

scsi_rname

decode a SCSI packet completion reason

scsi_sname

decode a SCSI sense key

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

scsi_hba_init

SCSI HBA system initialization routine

scsi_hba_fini

SCSI HBA system completion routine

scsi_hba_attach_setup

SCSI HBA attach routine

scsi_hba_detach

SCSI HBA detach routine

scsi_hba_probe

default SCSI HBA probe function

scsi_hba_tran_alloc

allocate a transport structure

scsi_hba_tran_free

free a transport structure

scsi_hba_pkt_alloc

allocate a scsi_pkt structure

scsi_hba_pkt_free

free a scsi_pkt structure

scsi_hba_lookup_capstr

return index matching capability string

 
 
 
  Previous   Contents   Next