Other Kernel Extension and Device Driver Management Services
The device driver binding services are devswadd, devswdel, devswchg, and devswqry.
The devswadd, devswdel, and devswchg services are used to add, remove, or modify device driver entries in the dynamically-managed device switch table. The devswqry service is used to obtain information about a particular device switch table entry.
Some kernel extensions might be sensitive to the settings of base kernel runtime configurable parameters that are found in the var structure defined in the /usr/include/sys/var.h file. These parameters can be set automatically during system boot or at runtime by a privileged user. Kernel extensions can register or unregister a configuration notification routine with the cfgnadd and cfgndel kernel services. Each time the sysconfig subroutine is used to change base kernel tunable parameters found in the var structure, each registered configuration notification routine is called.
The prochadd and prochdel kernel services allow kernel extensions to be notified when any process in the system has a state transition, such as being created, exiting, or being swapped in or swapped out.
The uexadd and uexdel kernel services give kernel extensions the capability to intercept user-mode exceptions. A user-mode exception handler can use this capability to dynamically reassign access to single-use resources or to clean up after some particular user-mode error. The associated uexblock and uexclear services can be used by these handlers to block and resume process execution when handling these exceptions.
The getexcept kernel service is used by device drivers to obtain detailed information about exceptions that occur during I/O bus access. The getexcept service can also be used by any exception handler requiring more information about an exception that has occurred. The selreg kernel service is used by file select operations to register unsatisfied asynchronous poll or select event requests with the kernel. The selnotify kernel service provides the same functionality as the selwakeup service found on other operating systems.
The iostadd and iostdel services are used by tty and disk device drivers to register device activity reporting structures to be used by the iostat and vmstat commands.
The getuerror and setuerror services allow kernel extensions
to read or set the ut_error
field for the current
thread. This field can be used to pass an error code from a system
call function to an application program, because kernel extensions
do not have direct access to the application's errno variable.