Table C-2: Summary Descriptions of Kernel Support Interfaces
| Kernel Interface | Summary Description |
| assert_wait_mesg |
Asserts that the current kernel thread is
about to block (sleep). |
| atoi |
Converts an ASCII string to an integer. |
| BADADDR |
Probes the address during device autoconfiguration. |
| bcmp |
Compares two byte strings. |
| bcopy |
Copies a series of bytes with a specified
limit. |
| biodone |
Indicates that block I/O is complete. |
| blkclr |
Zeros a block of memory. |
| brelse |
Deallocates a buf structure. |
| btop |
Converts bytes to number of pages. |
| BUF_LOCK |
Locks the specified I/O buffer. |
| BUF_UNLOCK |
Unlocks the specified I/O buffer. |
| busphys_to_iohandle |
Converts a valid bus physical address to
an I/O handle base. |
| bzero |
Zeros a block of memory. |
| cfgmgr_get_state |
Determines the configuration state. |
| cfgmgr_set_status |
Reports failure to the cfgmgr
framework. |
| clear_wait |
Clears the wait condition. |
| configure_driver |
Configures a device driver that is in the
dynamic state. |
| contig_free |
Frees a block of memory previously allocated
by contig_malloc. |
| contig_malloc |
Allocates physically contiguous memory. |
| copyin |
Copies data from a user address space to
a kernel address space. |
| copyinstr |
Copies a null-terminated string from a user
address space to a kernel address space. |
| copyout |
Copies data from a kernel address space to
a user address space. |
| copyoutstr |
Copies a null-terminated string from a kernel
address space to a user address space. |
| copystr |
Copies a null-terminated character string
with a specified limit. |
| copy_to_phys |
Copies data from a virtual address to a physical
address. |
| create_controller_struct |
Creates a controller structure
for the system (hardware) configuration tree. |
| create_device_struct |
Creates a device structure
for the system (hardware) configuration tree. |
| current_task |
Returns a pointer to the task
structure associated with the currently running kernel thread. |
| current_thread |
Is a pointer to the currently running kernel
thread. |
| decl_simple_lock_data |
Declares a simple lock structure. |
| DELAY |
Delays the calling interface a specified
number of microseconds. |
| devsw_add |
Registers driver entry points and reserves
a major number. |
| devsw_del |
Clears entry points from the device switch
table. |
| devsw_get |
Obtains a previously reserved major number. |
| dma_get_curr_sgentry |
Returns a pointer to the current sg_entry. |
| dma_get_next_sgentry |
Returns a pointer to the next sg_entry. |
| dma_get_private |
Gets a data element from the DMA private
storage space. |
| dma_kmap_buffer |
Returns a kernel segment (kseg) address of
a DMA buffer. |
| dma_map_alloc |
Allocates resources for DMA data transfers. |
| dma_map_dealloc |
Releases and deallocates the DMA resources
previously allocated for DMA data transfers. |
| dma_map_load |
Loads and sets allocated DMA resources and
sets up a DMA data path for DMA data transfers. |
| dma_map_unload |
Unloads the system DMA resources. |
| dma_min_boundary |
Returns system-level information. |
| dma_put_curr_sgentry |
Puts a new bus address/byte count pair in
the linked list of sg_entry structures. |
| dma_put_prev_sgentry |
Updates an internal pointer index to the
linked list of sg_entry structures. |
| dma_put_private |
Stores a data element in the DMA private
storage space. |
| do_config |
Initializes the device to its assigned configuration. |
| drvr_register_flush |
Registers or deregisters a flush interface. |
| drvr_register_shutdown |
Registers or deregisters a shutdown interface. |
| ffs |
Finds the first set bit in a mask. |
| FREE |
Deallocates (frees) the allocated kernel
virtual memory. |
| fubyte |
Returns a byte from user address space. |
| fuibyte |
Returns a byte from user instruction address
space. |
| fuiword |
Returns a word from user instruction address
space. |
| fuword |
Returns a word from user instruction address
space. |
| get_config |
Returns assigned configuration data for a
device. |
| get_def_partitionmap |
Calculates a default partition map. |
| get_info |
Returns system-specific information. |
| getnewbuf |
Allocates a buf structure. |
| gsignal |
Sends a signal to a process group. |
| handler_add |
Registers a device driver's interrupt handler. |
| handler_del |
Deregisters a device driver's interrupt handler. |
| handler_disable |
Disables a previously registered interrupt
handler. |
| handler_enable |
Enables a previously registered interrupt
handler. |
| htonl |
Converts longword values from host-to-network
byte order. |
| htons |
Converts word values from host-to-network
byte order. |
| insque |
Adds an element to the queue. |
| io_copyin |
Copies data from bus address space to system
memory. |
| io_copyio |
Copies data from bus address space to bus
address space. |
| io_copyout |
Copies data from system memory to bus address
space. |
| iodone |
Indicates that I/O is complete. |
| iohandle_to_phys |
Converts an I/O handle to a valid system
physical address. |
| io_zero |
Zeros a block of memory in bus address space. |
| IS_KSEG_VA |
Determines if the specified address is located
in the kernel-unmapped address space. |
| IS_SEG0_VA |
Determines if the specified address is located
in the user-mapped address space. |
| IS_SEG1_VA |
Determines if the specified address is located
in the kernel-mapped address space. |
| kernel_isrthread |
Starts a fixed priority kernel thread dedicated
to interrupt service. |
| kernel_thread_w_arg |
Starts a kernel thread with a calling argument
passed in. |
| KSEG_TO_PHYS |
Converts a kernel-unmapped virtual address
to a physical address. |
| lock_done |
Releases a complex lock. |
| lock_init |
Initializes a complex lock. |
| lock_read |
Asserts a complex lock with read-only access. |
| lock_terminate |
Terminates, using a complex lock. |
| lock_try_read |
Tries to assert a complex lock with read-only
access. |
| lock_try_write |
Tries to assert a complex lock with write
access. |
| lock_write |
Asserts a complex lock with write access. |
| major |
Returns the device major number. |
| makedev |
Returns a CWdev_t\fP. |
| MALLOC |
Allocates a variable-size section of kernel
virtual memory. |
| mb |
Performs a memory barrier. |
| minor |
Returns the device minor number. |
| minphys |
Bounds the data transfer size. |
| mpsleep |
Blocks (puts to sleep) the current kernel
thread. |
| ntohl |
Converts longword values from network-to-host
byte order. |
| ntohs |
Converts word values from network-to-host
byte order. |
| ovbcopy |
Copies a byte string with a specified limit. |
| panic |
Causes a system crash. |
| physio |
Implements raw I/O. |
| PHYS_TO_KSEG |
Converts a physical address to a kernel-unmapped
virtual address. |
| pmap_extract |
Extracts a physical page address. |
| pmap_kernel |
Returns the physical map handle for the kernel. |
| pmap_set_modify |
Sets the modify bits of the specified physical
page. |
| printf |
Prints text to the console and the error
logger. |
| privileged |
Checks for proper privileges. |
| psignal |
Sends a signal to a process. |
| queue_init |
Initializes the specified queue. |
| READ_BUS_D8 |
Reads a byte (8 bits) from a device register. |
| READ_BUS_D16 |
Reads a word (16 bits) from a device register. |
| READ_BUS_D32 |
Reads a longword (32 bits) from a device
register. |
| READ_BUS_D64 |
Reads a quadword (64 bits) from a device
register. |
| readdisklabel |
Reads a disk label from a device. |
| read_io_port |
Reads data from a device register. |
| register_callback |
Registers a callback request (interface). |
| remque |
Removes an element from the queue. |
| rmalloc |
Allocates size units from the given resource
map. |
| rmfree |
Frees space previously allocated into the
specified resource map. |
| rmget |
Allocates size units from the given resource
map. |
| rminit |
Initializes a resource map. |
| round_page |
Rounds the specified address. |
| rt_post_callout |
Posts an interface to be called at a lower
IPL. |
| rt_post_callout_ipl |
Posts an interface to be called at a specified
IPL. |
| select_dequeue |
Removes the last kernel thread waiting for
an event. |
| select_dequeue_all |
Removes all kernel threads waiting for an
event. |
| select_enqueue |
Adds the current kernel thread. |
| select_wakeup |
Wakes up a kernel thread. |
| setdisklabel |
Sets a disk label. |
| simple_lock |
Asserts a simple lock. |
| simple_lock_init |
Initializes a simple lock structure. |
| simple_lock_terminate |
Terminates, using a simple lock. |
| simple_lock_try |
Tries to assert a simple lock. |
| simple_unlock |
Releases a simple lock. |
| sleep |
Puts a calling process to sleep. |
| spl |
Sets the processor priority to mask different
levels of interrupts. |
| strcmp |
Compares two null-terminated character strings. |
| strcpy |
Copies a null-terminated character string. |
| strlen |
Returns the number of characters in a null-terminated
string. |
| strncmp |
Compares two strings, using a specified number
of characters. |
| strncpy |
Copies a null-terminated character string
with a specified limit. |
| subyte |
Writes a byte into user address space. |
| suibyte |
Writes a byte into user instruction address
space. |
| suiword |
Writes a word into user instruction address
space. |
| suser |
Checks whether the current user is the superuser. |
| suword |
Writes a word into user address space. |
| svatophys |
Converts a system virtual address to a physical
address. |
| swap_lw_bytes |
Performs a longword byte swap. |
| swap_word_bytes |
Performs a short word byte swap. |
| swap_words |
Performs a word byte swap. |
| thread_block |
Blocks (puts to sleep) the current kernel
thread. |
| thread_halt_self |
Handles asynchronous traps for self-terminating
kernel threads. |
| thread_set_timeout |
Sets a timer for the current kernel thread. |
| thread_terminate |
Prepares to stop or stops execution of the
specified kernel thread. |
| thread_wakeup |
Wakes up all kernel threads waiting for the
specified event. |
| thread_wakeup_one |
Wakes up the first kernel thread waiting
on a channel. |
| timeout |
Initializes a callout queue element. |
| trunc_page |
Truncates the specified address. |
| uiomove |
Moves data between user and system virtual
space. |
| unconfigure_driver |
Unconfigures a device driver that was dynamically
configured. |
| unix_master |
Forces execution onto the master CPU. |
| unix_release |
Releases binding of the kernel thread. |
| unregister_callback |
Deregisters a callback request (interface). |
| untimeout |
Removes the scheduled interface from the
callout queues. |
| uprintf |
Is a nonsleeping kernel printf function. |
| vm_map_pageable |
Sets pageability of the specified address
range. |
| vtop |
Converts any virtual address to a physical
address. |
| wakeup |
Wakes up all processes sleeping on a specified
address. |
| WRITE_BUS_D8 |
Writes a byte (8 bits) to a device register. |
| WRITE_BUS_D16 |
Writes a word (16 bits) to a device register. |
| WRITE_BUS_D32 |
Writes a longword (32 bits) to a device register. |
| WRITE_BUS_D64 |
Writes a quadword (64 bits) to a device register. |
| writedisklabel |
Writes a disk label. |
| write_io_port |
Writes data to a device register. |