---
title: Enqueue
framework: kernel
role: symbol
role_heading: Instance Method
path: kernel/iodataqueuedispatchsource/3438180-enqueue
---

# Enqueue

Adds a single entry to the shared data queue.

## Declaration

```occ
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

Return Value kIOReturnSuccess on success, kIOReturnOverrun if the queue was full, or kIOReturnError if the queue is corrupt. See Error Codes.

## See Also

### Adding Work to the Queue

- [SetDataServicedHandler](driverkit/iodataqueuedispatchsource/setdataservicedhandler.md)
- [DataServiced](driverkit/iodataqueuedispatchsource/dataserviced.md)
- [IODataQueueClientEnqueueEntryBlock](driverkit/iodataqueueclientenqueueentryblock.md)
- [EnqueueWithCoalesce](kernel/iodataqueuedispatchsource/3438181-enqueuewithcoalesce.md)
- [SendDataAvailable](kernel/iodataqueuedispatchsource/3438184-senddataavailable.md)
