---
title: DispatchSync_f
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/iodispatchqueue/dispatchsync_f
---

# DispatchSync_f

Schedule a C-style function for synchronous execution on the current queue.

## Declaration

```occ
void DispatchSync_f(void *context, IODispatchFunction function);
```

## Parameters

- `context`: A pointer to contextual data that you want to pass to the function.
- `function`: The function to execute on the queue.

## Discussion

Discussion This method schedules the function for execution on the queue and waits for it to complete before returning. The system retains the queue until the function completes.

## See Also

### Executing a Task Synchronously

- [DispatchSync](driverkit/iodispatchqueue/dispatchsync.md)
