<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IODataQueueDispatchSource/Enqueue",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@IODataQueueDispatchSource@F@Enqueue#i#BFv(#*v#l)#"
  },
  "title" : "Enqueue"
}
-->

# Enqueue

Adds a single entry to the shared data queue.

```
kern_return_t Enqueue(uint32_t dataSize, IODataQueueClientEnqueueEntryBlock callback);
```

## Parameters

`dataSize`

The size of the data to enqueue.

`callback`

The callback to execute when there is enough space to enqueue the data.

## Return Value

[`kIOReturnSuccess`](/documentation/DriverKit/kIOReturnSuccess) on success, [`kIOReturnOverrun`](/documentation/DriverKit/kIOReturnOverrun) if the queue was full, or [`kIOReturnError`](/documentation/DriverKit/kIOReturnError) if the queue is corrupt. See [Error Codes](/documentation/DriverKit/error-codes).

---

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)