aio_suspend(2)

aio_suspend2

Suspend until asynchronous i/o operations or timeout complete (realtime)

Usage

#include <aio.h>

int

aio_suspend(const struct aiocb *const iocbs[], int niocb, const struct timespec *timeout);

Library

Standard C Library (libc, -lc)

Overview

The aio_suspend() system call suspends the calling process until at least one of the specified asynchronous I/O requests have completed, a signal is delivered, or the timeout has passed.

The iocbs argument is an array of niocb pointers to asynchronous I/O requests. Array members containing null pointers will be silently ignored.

If timeout is not a null pointer, it specifies a maximum interval to suspend. If timeout is a null pointer, the suspend blocks indefinitely. To effect a poll, the timeout should point to a zero-value timespec structure.

Return values

If one or more of the specified asynchronous I/O requests have completed, aio_suspend() returns 0. Otherwise it returns -1 and sets errno to indicate the error, as enumerated below.

Errors

The aio_suspend() system call will fail if:

[EAGAIN]

the timeout expired before any I/O requests completed.

[EINVAL]

The iocbs argument contains more asynchronous I/O requests than the vfs.aio.max_aio_queue_per_proc sysctl(8) variable, or at least one of the requests is not valid.

[EINTR]

the suspend was interrupted by a signal.

Releases

74 releases since FreeBSD 3.3-RELEASE; the text changed 43 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–5.2.1
  11. 5.3–5.5
  12. 6.0–6.3
  13. 6.4
  14. 7.0
  15. 7.1
  16. 7.2
  17. 7.3
  18. 7.4
  19. 8.0
  20. 8.1
  21. 8.2
  22. 8.3
  23. 8.4
  24. 9.0
  25. 9.1
  26. 9.2
  27. 9.3
  28. 10.0
  29. 10.1
  30. 10.2
  31. 10.3
  32. 10.4
  33. 11.0
  34. 11.1
  35. 11.2
  36. 11.3
  37. 11.4
  38. 12.0
  39. 12.1
  40. 12.2
  41. 12.3
  42. 12.4
  43. 13.0–13.2
  44. 13.3–16.0

Standards

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

History

The aio_suspend() 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.