Specifications
D
evice Driver Programming
17-22
Procedures for using the server_block and the server_wake1 system calls in a
user-level driver’s interrupt routine are explained in “Developing the Driver’s Interrupt
Service Routine” on page 17-34.
The User-Level Interrupt Library Routines and Utility 17
The PowerUX and Secure/PowerUX operating systems provide the support necessary to
allow a process to connect a routine to an interrupt vector for the interrupt generated by a
selected device and to enable the connection. When a process defines an interrupt vector
connection, it specifies the number of the interrupt vector to which it is connecting and the
address of a user interrupt-handling routine to execute upon each occurrence of the con-
nected interrupt. When a process enables the connection to an interrupt vector, it blocks in
the kernel; it no longer executes at normal program level. It executes only at interrupt
level--executing the specified interrupt-handling routine when the connected interrupt
becomes active. The interrupt-handling routine can reference any memory location that is
in the virtual address space of this process.
The process that defines and enables an interrupt vector connection is hereinafter referred
to as the user-level interrupt process. The routine that is executed each time the connected
interrupt occurs is hereinafter referred to as the interrupt-handling routine. Several
constraints are imposed on the user-level interrupt process and on the user-level interrupt-
handling routine. These constraints are described in the PowerUX Real-Time Guide.
A user-level interrupt process defines and enables an interrupt vector connection by using
the iconnect(3C) and the ienable(3C) library routines. The iconnect(3C)
library routine can also be used to allocate and free interrupt vectors and to disconnect a
user-level interrupt process from an interrupt vector. The uistat(1) utility allows you
to (1) display user-level interrupt vector connections that have been defined on your
system, (2) remove interrupt vector connection definitions, and (3) disconnect user-level
interrupt processes for which a connection has been enabled.
The user-level interrupt routine facility is optional. To configure a kernel with user-level
interrupt support enabled, modify the ui file in the /etc/conf/sdevice.d directory.
Set the configure field in the ui file to Y, and build a kernel with the idbuild(1M)
utility. Refer to the idbuild(1M) system manual page for details.
An overview of user-level interrupt routines and a detailed explanation of the procedures
for using them are provided in the PowerUX Real-Time Guide. Reference information on
the iconnect(3C) and the ienable(3C) library routines and the uistat(1) util-
ity is provided in the corresponding system manual pages.
If you are writing a user-level device driver that handles interrupts generated by the device
that the driver controls, you must use the operating system’s support for user-level
interrupt routines. Procedures for developing a user-level device driver’s interrupt service
routine using this support are explained in detail in “Developing the Driver’s Interrupt Ser-
vice Routine” on page 17-34.