NAME | SYNOPSIS | FEATURES | DESCRIPTION | EXTENDED DESCRIPTION | ATTRIBUTES
#include <ddi/ric/ric.h>
DDI
Provides RIC device driver services.
typedef struct RicDevOps { RicVersion version; KnError (*intr_attach) (RicDevId dev_id, RicInt dev_intr, RicIntrHandler dev_intr_handler, void* dev_intr_cookie, RicIntrOps** ric_intr_ops, RicIntrId* ric_intr_id); void (*intr_detach) (RicIntrId ric_intr_id); } RicDevOps;
A pointer to the RicDevOps structure is exported by the driver via the svDeviceRegister microkernel call. A driver client invokes the svDeviceLookup and svDeviceEntry microkernel calls in order to obtain a pointer to the device service routines vector. Once the pointer is obtained, the driver client is able to invoke the driver service routines (via the indirect function call) in order to attach/detach interrupts.
intr_attach establishes a connection between a driver client and a given device driver instance.
The intr_attach routine is called with the following arguments:
RIC device identifier.
RIC interrupt number offset.
Handler in the device driver which is invoked by the RIC driver when the corresponding interrupt occurs.
Cookie passed to the interrupt handler.
Points to the RicIntrOps structure which specifies the client call-back handlers (see section: Up-Call Handlers).
RIC interrupt identifier returned.
On success, K_OK is returned and the services defined on the attached interrupt are returned in the intrOps parameter. An identifier for the attached interrupt is also returned in ric_intr_id. This identifier must be used as first argument to subsequent calls to ric_intr_ops services. The corresponding interrupt is enabled.
On failure, an error code is returned as follows:
The specified RIC interrupt offset is invalid.
Another handler is already attached to the given interrupt .
The system is out of memory.
The intr_detach routine disconnects a driver client using the following arguement:
RIC interrupt identifier.
The corresponding interrupt is disabled.
The driver client up-call handlers are specified by the RicIntrOps structure and given to the device driver as an argument of intr_attach.
typedef struct RicIntrOps { void (*mask) (RicIntrId ric_intr_id); void (*unmask) (RicIntrId ric_intr_id); void (*enable) (RicIntrId ric_intr_id); void (*disable) (RicIntrId ric_intr_id); } RicIntrOps;
The RicIntrOps.mask service routine masks the interrupt source specified by ric_intr_id.
The RicIntrOps.unmask service routine unmasks the interrupt source previously masked by RicIntrOps.mask.
The RicIntrOps.mask / RicIntrOps.unmask pair may be used at either base or interrupt level.
The RicIntrOps.enable and RicIntrOps.disable service routines are dedicated to interrupt handler usage only. These routines may only be called by an interrupt handler.
The RicIntrOps.enable service routine enables the interrupt source specified by ric_intr_id.
The RicIntrOps.enable service routine diabless the interrupt source specified by ric_intr_id.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | FEATURES | DESCRIPTION | EXTENDED DESCRIPTION | ATTRIBUTES