---
name: "io_uring_submit_and_wait_reg"
section: "3"
platform: "linux"
package: "liburing"
version: "2.15-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/io_uring_submit_and_wait_reg"
---

# io\_uring\_submit\_and\_wait\_reg(3)

Sets up and registers fixed wait regions

## NAME

io\_uring\_submit\_and\_wait\_reg - Sets up and registers fixed wait regions

## SYNOPSIS

```
#include <liburing.h>
```

**int io\_uring\_submit\_and\_wait\_reg(struct io\_uring \****ring***,**                                  **struct io\_uring\_cqe \*\****cqe\_ptr***,**                                  **unsigned** *wait\_nr***,**                                  **int** *reg\_index***);**

## DESCRIPTION

The [**io\_uring\_submit\_and\_wait\_reg**(3)](/io_uring_submit_and_wait_reg/3.md) submits previously prepared requests in the ring *ring* and waits for *wait\_nr* completions using the registered wait index of *reg\_index*. Upon successful return, the completion events are stored in the *cqe\_ptr* array.

This function works like [**io\_uring\_submit\_and\_wait\_min\_timeout**(3)](/io_uring_submit_and_wait_min_timeout/3.md) in that it supports all the features of that helper, but rather than pass in all the information in a struct that needs copying, it references a registered wait index for which previously registered wait region holds information about how the wait should be performed. That includes information such as the overall timeout, the minimum timeout to be used, and so forth. See **io\_uring\_setup\_register\_region**(3) for the details on registered regions, specifically for registered wait regions.

Using registered wait regions has less overhead then other wait methods, as no copying of data is needed.

It's valid to use this function purely for waiting on events, even if no new requests should be submitted.

## RETURN VALUE

On success [**io\_uring\_submit\_and\_wait\_reg**(3)](/io_uring_submit_and_wait_reg/3.md) returns the number of new requests submitted. On failure it returns **-errno**. If the kernel doesn't support this functionality, **-EINVAL** will be returned. If no events are submitted and the wait operation times out, then **-ETIME** will be returned.

## SEE ALSO

[**io\_uring\_register\_region**(3)](/io_uring_register_region/3.md)**,** [**io\_uring\_submit\_and\_wait\_min\_timeout**(3)](/io_uring_submit_and_wait_min_timeout/3.md)**,** [**io\_uring\_submit\_and\_wait\_timeout**(3)](/io_uring_submit_and_wait_timeout/3.md)
