SWI_getattrs
Application Program Interface
2-437
C Interface
Syntax
SWI_getattrs(swi, attrs);
Parameters
SWI_Handle swi;
/* handle of the swi */
SWI_Attrs
*attrs;
/* pointer to swi attributes */
Return Value
Void
Description
SWI_getattrs retrieves attributes of an existing SWI object.
The swi parameter specifies the address of the SWI object whose
attributes are to be retrieved. The attrs parameter, which is the pointer to
a structure that contains the retrieved attributes for the SWI object,
facilitates retrieval of the attributes of the SWI object.
The SWI object’s attributes are specified through a structure of type
SWI_attrs defined as follows:
struct SWI_Attrs {
SWI_Fxn fxn;
Arg arg0;
Arg arg1;
Int priority;
Uns mailbox;
};
The fxn attribute, which is the address of the SWI function, serves as the
entry point of the software interrupt service routine.
The arg0 and arg1 attributes specify the arguments passed to the SWI
function, fxn.
The priority attribute specifies the SWI object’s execution priority and
ranges from 0 to 14. The highest level is SWI_MAXPRI (14). The lowest
is SWI_MINPRI (0). The priority level of 0 is reserved for the KNL_swi
object, which runs the task scheduler.
The mailbox attribute is used either to determine whether to post the SWI
or as a value that can be evaluated within the SWI function.
SWI_getattrs
Get attributes of a software interrupt