---
name: "io_setup"
section: "3"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/io_setup/3"
---

# io\_setup(3)

create an asynchronous I/O context

## NAME

io\_setup - create an asynchronous I/O context

## LIBRARY

Asynchronous I/O library (*libaio*, *-laio*)

## SYNOPSIS

```
#include <libaio.h>
```

**long io\_setup(unsigned int** *n***, io\_context\_t \****ctx\_idp***);**

## DESCRIPTION

**io\_setup**() creates an asynchronous I/O context suitable for concurrently processing *n* operations.

## RETURN VALUE

On success, **io\_setup**() returns 0. On error, a negative error code is returned to indicate the error.

## ERRORS

See [**io\_setup**(2)](/io_setup/2.md).

## STANDARDS

libaio.

## HISTORY

libaio.

## SEE ALSO

[**io\_setup**(2)](/io_setup/2.md), [**io**(3)](/io/3.md), [**aio**(7)](/aio/7.md)
