(D3) - Kernel utility functions
(D3) - Kernel utility functions
Intro-
introduction to kernel functions
ASSERT-
verify assertion
ATOMIC_INT_ADD-
add to an ATOMIC_INT value
ATOMIC_INT_ALLOC-
allocate an ATOMIC_INT structure
ATOMIC_INT_DEALLOC-
free an ATOMIC_INT object
ATOMIC_INT_DECR-
decrement an ATOMIC_INT value
ATOMIC_INT_INCR-
increment an ATOMIC_INT value
ATOMIC_INT_INIT-
initialize an ATOMIC_INT object
ATOMIC_INT_READ-
read the value stored within an ATOMIC_INT
ATOMIC_INT_SUB-
subtract from an ATOMIC_INT value
ATOMIC_INT_WRITE-
write a value into an ATOMIC_INT
bcb_alloc-
allocate a breakup control block
bcb_free-
free a breakup control block
bcb_prep-
prepare a breakup control block structure for use
bcmp-
compare data between two kernel address locations
bcopy-
copy data between address locations in the kernel
biocanblock-
ensure that a b_iodone handler is executing in a blockable context
biodone-
release buffer after block I/O and wakeup processes
bioerror-
manipulate error fields within a buffer header
bioreset-
reset a private buffer for reuse after completed I/O
biowait-
suspend execution pending completion of block I/O
biowait_sig-
suspend execution pending completion of block I/O or signal
bp_mapin-
allocate virtual address space for buffer page list
bp_mapout-
deallocate virtual address space for buffer page list
brelse-
return a buffer to the system's free list
bs_getval-
Get value of a boot parameter
btop-
convert size in bytes to size in pages (round down)
btopr-
convert size in bytes to size in pages (round up)
buf_breakup-
unified I/O breakup routine
bzero-
clear memory for a given number of bytes
call_demon-
invoke current kernel debugger
clrbuf-
erase the contents of a buffer
cm_abort_trans-
terminate a resource manager transaction
cm_addval-
add an entry to the resource manager database
cm_AT_putconf-
store standard parameters in resource manager database
cm_begin_trans-
begin a resource manager transaction
cm_delkey-
delete a resource manager record
cm_delval-
delete entries from the resource manager database
cm_devconfig_size-
get the size of device configuration space
cm_end_trans-
complete a resource manager transaction
cm_getbrdkey-
retrieve the resource manager key for a particular driver/board
cm_getnbrd-
determine number of boards supported by driver
cm_getval-
retrieve an entry from the resource manager database
cm_getversion-
get configuration manager version number
cm_intr_attach-
attach device interrupts
cm_intr_detach-
detach device interrupts
cmn_err-
display an error message or panic the system
cm_newkey-
create a new resource manager record
cm_read_devconfig-
read a board's NVRAM extension information
cm_read_devconfig16-
read word from board's NVRAM extension information
cm_read_devconfig32-
read double word from board's NVRAM extension information
cm_read_devconfig8-
read byte from board's NVRAM extension information
cm_write_devconfig-
write a board's NVRAM extension information
cm_write_devconfig16-
write byte to board's NVRAM extension information
cm_write_devconfig32-
write byte to board's NVRAM extension information
cm_write_devconfig8-
write byte to board's NVRAM extension information
copyin-
copy data from a user buffer to a driver buffer
copyout-
copy data from a driver buffer to a user buffer
delay-
delay process execution for a specified number of clock ticks
devmem_mapin-
obtain virtual address mapping for physical offsets within device memory
devmem_mapout-
free virtual address mapping for physical offsets within device memory
devmem_ppid-
get physical page ID for physical offsets within device memory
devmem_size-
obtain the size of a device memory block
dma_cascade-
program a DMA channel for cascade mode
dma_disable-
disable recognition of hardware requests on a DMA channel
dma_enable-
enable recognition of hardware requests on a DMA channel
dma_free_buf-
free a previously allocated DMA buffer descriptor
dma_free_cb-
free a previously allocated DMA command block
dma_get_best_mode-
determine best transfer mode for DMA command
dma_get_buf-
allocate a DMA buffer descriptor
dma_get_cb-
allocate a DMA command block
dma_pageio-
break up an I/O request into manageable units
dma_physreq-
apply constraints for DMA channel and path size
dma_prog-
program a DMA operation for a subsequent hardware request
dma_stop-
stop software-initiated DMA operation on a channel and release it
dma_swsetup-
program a DMA operation for a subsequent software request
dma_swstart-
initiate a DMA operation via software request
do_biostart-
invoke another driver's biostart(D2) entry point routine
do_devinfo-
invoke another driver's devinfo(D2) entry point routine
do_drvctl-
call another driver's drvctl(D2) entry point routine
do_ioctl-
invoke another driver's ioctl(D2) entry point routine
drv_attach-
register a driver and its entry points
drv_callback-
call a function when an exceptional event happens
drv_close-
obtain a channel handle for subsequent access by layered driver
drv_detach-
deregister a driver registered by drv_attach(D3)
drv_gethardware-
retrieve hardware information
drv_getparm-
retrieve kernel state information
drv_hztousec-
convert clock ticks to microseconds
drv_mmap-
map device memory into user space
drv_munmap-
release user mapping of kernel virtual or physical addresses
drv_open-
obtain a channel handle for subsequent access by layered driver
drv_priv-
determine whether credentials are privileged
drv_setparm-
set kernel state information
drv_shutdown-
initiate a system shutdown
drv_usectohz-
convert microseconds to clock ticks
drv_usecwait-
busy-wait for specified interval
dtimeout-
execute a function on a specified processor after a specified length of time
eisa_parse_devconfig-
parse EISA device configuration space
etoimajor-
convert external to internal major device number
freerbuf-
free a raw buffer header
geteblk-
get an empty buffer
getemajor-
get external major device number
geteminor-
get external minor device number
geterror-
retrieve error number from a buffer header
getmajor-
get internal major device number
getminor-
get internal minor device number
getnextpg-
get next page pointer
getpl-
get current interrupt priority level
getrbuf-
get a raw buffer header
hat_getkpfnum-
get physical page ID for kernel virtual address
hat_getppfnum-
get physical page ID for physical address
ifstats_attach-
register a network interface statistics structure
ifstats_detach-
un-register a network interface statistics structure
inb-
read a byte from an 8 bit I/O port
inl-
read a 32 bit word from a 32 bit I/O port
inw-
read a 16 bit short word from a 16 bit I/O port
iobitmapctl-
enable/disable/check user access to I/O ports
itimeout-
execute a function after a specified length of time
itoemajor-
convert internal to external major device number
kmem_alloc-
allocate space from kernel free memory
kmem_alloc_phys-
allocate DMA-addressable, driver-accessible memory
kmem_alloc_physcontig-
allocate physically contiguous memory
kmem_alloc_physreq-
allocate memory with specified physical properties
kmem_free-
free previously allocated kernel memory
kmem_free_physcontig-
free kernel memory previously allocated with kmem_alloc_physcontig
kmem_zalloc-
allocate and clear space from kernel free memory
kmem_zalloc_physreq-
allocate and clear memory with specified physical properties
KS_HOLD0LOCKS-
determine that the current context holds no basic or read/write locks
kthread_exit-
cause current thread to exit
kthread_spawn-
spawn a new kernel thread
kthread_wait-
wait for a specified thread to exit
kvtoppid-
get physical page ID for kernel virtual address
LOCK-
acquire a basic lock
LOCK_ALLOC-
allocate and initialize a basic lock
LOCK_DEALLOC-
deallocate an instance of a basic lock
LOCK_OWNED-
determine if the current context owns a basic lock
makedevice-
make device number from major and minor numbers
max-
return the larger of two integers
met_ds_alloc_stats-
allocate a disk statistics structure
met_ds_dealloc_stats-
deallocate a disk statistics structure
met_ds_dequeued-
update disk statistics after a failed attempt to put a request on the queue
met_ds_hist_stats-
update disk access and response time histograms when a request completes
met_ds_iodone-
update disk statistics when a read or write request completes
met_ds_queued-
update disk statistics when a read or write request is added to the queue
min-
return the lesser of two integers
mod_drvattach-
install interrupts for a loadable device driver
mod_drvdetach-
remove interrupts for a loadable device driver
ngeteblk-
get an empty buffer of the specified size
numtos-
convert an unsigned long number to an ASCII string in base 10
outb-
write a byte to an 8 bit I/O port
outl-
write a 32 bit long word to a 32 bit I/O port
outw-
write a 16 bit short word to a 16 bit I/O port
ovbcopy-
copy data between overlapping address locations in the kernel
phalloc-
allocate and initialize a pollhead structure
phfree-
free a pollhead structure
physiock-
validate and issue a raw I/O request
physmap-
obtain virtual address mapping for physical addresses
physmap_free-
free virtual address mapping for physical addresses
physreq_alloc-
allocate a physical alignment requirements structure
physreq_free-
free a physical alignment requirements structure
physreq_prep-
prepare a physical alignment requirements structure for use
phystoppid-
get physical page ID for physical address
pollwakeup-
inform polling processes that an event has occurred
pptophys-
convert page pointer to physical address
proc_ref-
obtain a reference to a process for signaling
proc_signal-
send a signal to a process
proc_unref-
release a reference to a process
proc_valid-
check whether a referenced process has exited
psignal-
send signal to a process
ptob-
convert size in pages to size in bytes
rdma_filter-
filter transfers to use only DMA-able memory
repinsb-
read bytes from I/O port to buffer
repinsd-
read 32 bit words from I/O port to buffer
repinsw-
read 16 bit words from I/O port to buffer
repoutsb-
write bytes from buffer to an I/O port
repoutsd-
write 32 bit words from buffer to an I/O port
repoutsw-
write 16 bit words from buffer to an I/O port
rmalloc-
allocate space from a private space management map
rmallocmap-
allocate and initialize a private space management map
rmalloc_wait-
allocate space from a private space management map
rmfree-
free space into a private space management map
rmfreemap-
free a private space management map
rminit-
initialize a private space management map
rmsetwant-
set the map's wait flag for a wakeup
RW_ALLOC-
allocate and initialize a read/write lock
RW_DEALLOC-
deallocate an instance of a read/write lock
RW_RDLOCK-
acquire a read/write lock in read mode
RW_TRYRDLOCK-
try to acquire a read/write lock in read mode
RW_TRYWRLOCK-
try to acquire a read/write lock in write mode
RW_UNLOCK-
release a read/write lock
RW_WRLOCK-
acquire a read/write lock in write mode
scgth_free-
free a scatter/gather structure
sleep-
suspend process execution pending occurrence of an event
SLEEP_ALLOC-
allocate and initialize a sleep lock
SLEEP_DEALLOC-
deallocate an instance of a sleep lock
SLEEP_LOCK-
acquire a sleep lock
SLEEP_LOCKAVAIL-
query whether a sleep lock is available
SLEEP_LOCKOWNED-
query whether a sleep lock is held by the caller
SLEEP_LOCK_SIG-
acquire a sleep lock
SLEEP_TRYLOCK-
try to acquire a sleep lock
SLEEP_UNLOCK-
release a sleep lock
spl-
block/allow interrupts on a processor
spl0-
block no interrupts (equivalent to splbase)
spl6-
block interrupts from the clock (SCO OpenServer only)
spl7-
block all interrupts (equivalent to splhi) on Intel processors
splbase-
block no interrupts
spldisk-
block disk devie interrupts
splhi-
block all interrupts, including the clock
splstr-
block STREAMS interrupts
spltimeout-
block functions scheduled by itmeout and dtimeout
spltty-
protect critical code in TTY driver; mapped to splstr
splx-
restore priority level
strcat-
concatenate strings
strchr-
find first or last occurence of a character in a string
strcmp-
compare strings
strcpy-
copy a string
strlen-
determine the length of a string
strncat-
concatenate strings appending a specified number of characters
strncmp-
compare strings using a specified number of characters
strncpy-
copy a string using a specified number of characters
strtoul-
convert string to an unsigned long integer
SV_ALLOC-
allocate and initialize a synchronization variable
SV_BROADCAST-
wake up all processes sleeping on a synchronization variable
SV_DEALLOC-
deallocate an instance of a synchronization variable
SV_SIGNAL-
wake up one process sleeping on a synchronization variable
SV_WAIT-
block on a synchronization variable
SV_WAIT_SIG-
sleep on a synchronization variable
TICKS-
macros for lbolt values
TICKS_BETWEEN-
determine time interval in ticks between two lbolt times
TICKS_FARFUTURE-
determine lbolt value for far future time
TICKS_FARPAST-
determine lbolt value for far past time
TICKS_LATER-
determine which of two lbolt times is later
TICKS_SINCE-
determine time interval in ticks since an lbolt time
timeout-
execute a function after a specified length of time
TRYLOCK-
try to acquire a basic lock
uiobuf-
set buffer address type to BA_UIO for a specified uio structure
uiomove-
copy data using uio structure
UNLOCK-
release a basic lock
untimeout-
cancel previous timeout request
ureadc-
copy a character to space described by uio structure
uwritec-
return a character from space described by uio structure
vtop-
convert virtual address to physical address
wakeup-
resume suspended process execution
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005