io\_uring\_register\_sync\_cancel(3) liburing Manual io\_uring\_register\_sync\_cancel(3)

# [NAME](#NAME)

io\_uring\_register\_sync\_cancel - issue a synchronous cancelation request

# [SYNOPSIS](#SYNOPSIS)

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

```
int io_uring_register_sync_cancel(struct io_uring *ring,
                                  struct io_uring_sync_cancel_reg *reg);
```

# [DESCRIPTION](#DESCRIPTION)

The [**io\_uring\_register\_sync\_cancel**(3)](/man/os/liburing/io_uring_register_sync_cancel.3) function performs a synchronous cancelation request based on the parameters specified in *reg .*

The *reg* argument must be filled in with the appropriate information for the cancelation request. It looks as follows:

```
struct io_uring_sync_cancel_reg {


    __u64 addr;


    __s32 fd;


    __u32 flags;


    struct __kernel_timespec timeout;


    __u8 opcode;


    __u8 pad[7];


    __u64 pad2[3];
};
```

The arguments largely mirror what the async prep functions support, see [**io\_uring\_prep\_cancel**(3)](/man/os/liburing/io_uring_prep_cancel.3) for details. Similarly, the return value is the same. The exception is the *timeout* argument, which can be used to limit the time that the kernel will wait for cancelations to be successful. If the *tv\_sec* and *tv\_nsec* values are set to anything but **-1UL ,** then they indicate a relative timeout upon which cancelations should be completed by.

The *pad* values must be zero filled.

# [RETURN VALUE](#RETURN_VALUE)

See [**io\_uring\_prep\_cancel**(3)](/man/os/liburing/io_uring_prep_cancel.3) for details on the return value. If *timeout* is set to indicate a timeout, then **-ETIME** will be returned if exceeded. If an unknown value is set in the request, or if the pad values are not cleared to zero, then *-EINVAL* is returned.

# [SEE ALSO](#SEE_ALSO)

[**io\_uring\_prep\_cancel**(3)](/man/os/liburing/io_uring_prep_cancel.3)

September 21, 2022 liburing-2.3

---

Document: io_uring_register_sync_cancel(3) from liburing 2.15-r4 (Chainguard OS)
Source: https://github.com/axboe/liburing.git
