<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IOInterruptDispatchSource/Create",
  "metadataVersion" : "0.1.0",
  "role" : "Static Method",
  "symbol" : {
    "kind" : "Static Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOInterruptDispatchSource@F@Create#*$@S@IOService#i#*$@S@IODispatchQueue#**$@S@IOInterruptDispatchSource#S"
  },
  "title" : "Create"
}
-->

# Create

Create a dispatch source that reports hardware-related interrupts generated by the specified service provider.

```
static kern_return_t Create(IOService *provider, uint32_t index, IODispatchQueue *queue, IOInterruptDispatchSource **source);
```

## Parameters

`provider`

The [`IOService`](/documentation/DriverKit/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`](/documentation/DriverKit/kIOReturnSuccess) on success, or another value if an error occurs. See [Error Codes](/documentation/DriverKit/error-codes).

## Discussion

Creates a new interrupt source for the specified provider object. After creating the dispatch source, call the [`SetHandler`](/documentation/DriverKit/IOInterruptDispatchSource/SetHandler) method to specify the action to perform when interrupts occur.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)