Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

Previous Previous     Contents     Index     Next Next

Device (dev_t) Functions

Table B-3 Device (dev_t) Functions

Function Name

Description

ddi_create_minor_node

create a minor node for a device

ddi_getiminor

get kernel internal minor number from an external dev_t

ddi_remove_minor_node

remove a minor mode for a device

getmajor

get major device number

getminor

get minor device number

makedevice

make device number from major and minor numbers

Property Functions

Table B-4 Property Functions

Function Name

Description

ddi_prop_exists

check for the existence of a property

ddi_prop_free

free resources consumed by property lookup

ddi_prop_get_int

look up integer property

ddi_prop_get_int64

look up 64-bit integer property

ddi_prop_lookup_byte_array

look up byte array property

ddi_prop_lookup_int_array

look up integer array property

ddi_prop_lookup_int64_array

look up 64-bit integer array property

ddi_prop_lookup_string

look up string property

ddi_prop_lookup_string_array

look up string array property

ddi_prop_remove

remove a property of a device

ddi_prop_remove_all

remove all properties of a device

ddi_prop_undefine

hide a property of a device

ddi_prop_update_byte_array

create or update byte array property

ddi_prop_update_int

create or update integer property

ddi_prop_update_int64

create or update 64-bit integer property

ddi_prop_update_int_array

create or update integer array property

ddi_prop_update_int64_array

create or update 64-bit integer array property

ddi_prop_update_string

create or update string property

ddi_prop_update_string_array

create or update string array property

Table B-5 Deprecated Property Functions

Deprecated Functions

Replacements

ddi_getlongprop

see ddi_prop_lookup

ddi_getlongprop_buf

see ddi_prop_lookup

ddi_getprop

ddi_prop_get_int

ddi_getproplen

see ddi_prop_lookup

ddi_prop_create

see ddi_prop_lookup

ddi_prop_modify

see ddi_prop_lookup

ddi_prop_op

see ddi_prop_lookup

Device Software State Functions

Table B-6 Device Software State Functions

Function Name

Description

ddi_get_driver_private

get the address of the device's private data area

ddi_get_soft_state

get pointer to instance soft state structure

ddi_set_driver_private

set the address of the device's private data area

ddi_soft_state_fini

destroy driver soft state structure

ddi_soft_state_free

free instance soft state structure

ddi_soft_state_init

initialize driver soft state structure

ddi_soft_state_zalloc

allocate instance soft state structure

Memory Allocation and Deallocation Functions

Table B-7 Memory Allocation and Deallocation Functions

Function Name

Description

kmem_alloc

allocate kernel memory

kmem_free

free kernel memory

kmem_zalloc

allocate zero-filled kernel memory

These functions allocate and free memory intended to be used for DMA. See Direct Memory Access (DMA) Functions.

Table B-8

Function Name

Description

ddi_dma_mem_alloc

allocate memory for DMA transfer

ddi_dma_mem_free

free previously allocated DMA memory

These functions allocate and free memory intended to be exported to user space. See User Space Access Functions.

Table B-9

Function Name

Description

ddi_umem_alloc

allocate page-aligned kernel memory

ddi_umem_free

free page-aligned kernel memory

Table B-10 Deprecated Memory Allocation and Deallocation Functions

Deprecated Functions

Replacement

ddi_iopb_alloc

ddi_dma_mem_alloc

ddi_iopb_free

ddi_dma_mem_free

ddi_mem_alloc

ddi_dma_mem_alloc

ddi_mem_free

ddi_dma_mem_free

Kernel Thread Control and Synchronization Functions

Table B-11 Kernel Thread Control and Synchronization Functions

Function Name

Description

cv_broadcast

wakeup all waiting threads

cv_destroy

free an allocated condition variable

cv_init

allocate a condition variable

cv_signal

wakeup one waiting thread

cv_timedwait

await an event with timeout

cv_timedwait_sig

await an event or signal with timeout

cv_wait

await an event

cv_wait_sig

await an event or signal

ddi_enter_critical

enter a critical region of control

ddi_exit_critical

exit a critical region of control

mutex_destroy

destroy mutual exclusion lock

mutex_enter

acquire mutual exclusion lock

mutex_exit

release mutual exclusion lock

mutex_init

initialize mutual exclusion lock

mutex_owned

determine if current thread is holding mutual exclusion lock

mutex_tryenter

attempt to acquire mutual exclusion lock without waiting

rw_destroy

destroy a readers/writer lock

rw_downgrade

downgrade a readers/writer lock holding from writer to reader

rw_enter

acquire a readers/writer lock

rw_exit

release a readers/writer lock

rw_init

initialize a readers/writer lock

rw_read_locked

determine whether readers/writer lock is held for read or write

rw_tryenter

attempt to acquire a readers/writer lock without waiting

rw_tryupgrade

attempt to upgrade readers/writer lock holding from reader to writer

sema_destroy

destroy a semaphore

sema_init

initialize a semaphore

sema_p

decrement semaphore and possibly block

sema_p_sig

decrement semaphore, but do not block if signal is pending

sema_tryp

attempt to decrement semaphore, but do not block

sema_v

increment semaphore and possibly unblock waiter

Previous Previous     Contents     Index     Next Next