aio_return(2)

aio_return2

Retrieve return status of asynchronous i/o operation (realtime)

Usage

#include <aio.h>

ssize_t

aio_return(struct aiocb *iocb);

Library

Standard C Library (libc, -lc)

Overview

The aio_return() system call returns the final status of the asynchronous I/O request associated with the structure pointed to by iocb.

The aio_return() system call should only be called once, to obtain the final status of an asynchronous I/O operation once it has completed ((aio_error) 2 returns something other than EINPROGRESS).

Return values

If the asynchronous I/O request has completed, the status is returned as described in read(2), readv(2), write(2), writev(2), or fsync(2). Otherwise, aio_return() returns -1 and sets errno to indicate the error condition.

Errors

The aio_return() system call will fail if:

[EINVAL]

The iocb argument does not reference a completed asynchronous I/O request.

[EINVAL]

The I/O operation was submitted with lio_listio(), and the value of the aio_lio_opcode is invalid.

Releases

74 releases since FreeBSD 3.3-RELEASE; the text changed 41 times.

  1. 3.3–3.4
  2. 3.5–3.5.1
  3. 4.0
  4. 4.1
  5. 4.1.1–4.2
  6. 4.3
  7. 4.4
  8. 4.5–4.11
  9. 5.0
  10. 5.1–6.3
  11. 6.4
  12. 7.0
  13. 7.1
  14. 7.2
  15. 7.3
  16. 7.4
  17. 8.0
  18. 8.1
  19. 8.2
  20. 8.3
  21. 8.4
  22. 9.0
  23. 9.1
  24. 9.2
  25. 9.3
  26. 10.0
  27. 10.1
  28. 10.2
  29. 10.3
  30. 10.4
  31. 11.0
  32. 11.1
  33. 11.2
  34. 11.3
  35. 11.4
  36. 12.0
  37. 12.1
  38. 12.2
  39. 12.3
  40. 12.4
  41. 13.0–13.2
  42. 13.3–16.0

Standards

The aio_return() system call is expected to conform to the IEEE Std 1003.1 (“POSIX.1”) standard.

History

The aio_return() system call first appeared in FreeBSD 3.0.

Authors

This manual page was written by Wes Peters ⟨[email protected]⟩.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.