Defines a virtual interrupt handler.
#include <sys/types.h> #include <sys/errno.h>
int vec_init (level, routine, arg) int level; void (*routine) (); int arg;
The vec_init kernel service is not part of the base kernel but provided by the device queue management kernel extension. This queue management kernel extension must be loaded into the kernel before loading any kernel extensions referencing these services.
The vec_init kernel service associates a virtual interrupt handler with a level and sublevel. This service searches the available sublevels to find the first unused one. The routine and arg parameters are used to initialize the open sublevel. The vec_init kernel service then returns the level and assigned sublevel.
There is a maximum number of available sublevels. If this number is exceeded, the vec_init service halts the system. This service should be called to initialize a virtual interrupt before any device queues using the virtual interrupt are created.
The level parameter is not used by the vec_init service. It is provided for compatibility reasons only. However, its value is passed back intact with the sublevel.
The vec_init kernel service can be called from the process environment only.
The vec_init kernel service returns a value that identifies the virtual interrupt level and assigned sublevel. The low-order 8 bits of this value specify the sublevel, and the high-order 8 bits specify the level. The attchq kernel service uses the same format. This level value is the same value as that supplied by the level parameter.
The vec_init kernel service is part of the Device Queue Management kernel extension.