Create
Create a dispatch source that reports hardware-related interrupts generated by the specified service provider.
Declaration
static kern_return_t Create(IOService *provider, uint32_t index, IODispatchQueue *queue, IOInterruptDispatchSource **source);Parameters
- provider:
The Ioservice object representing the hardware device that generated the interrupt.
- index:
The index for the interrupt.
- queue:
The dispatch queue on which to run any handler blocks.
- source:
A variable for storing the dispatch source. On return, this variable contains the retained object. You are responsible for releasing this object.
Return Value
kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.
Discussion
Creates a new interrupt source for the specified provider object. After creating the dispatch source, call the SetHandler method to specify the action to perform when interrupts occur.