DoxigAlpha

prep_poll_update

Function parameters

Parameters

#
sqe:*linux.io_uring_sqe
old_user_data:u64
new_user_data:u64
poll_mask:u32
flags:u32

Type definitions in this namespace

Types

#

Source

Implementation

#
pub fn prep_poll_update(
    sqe: *linux.io_uring_sqe,
    old_user_data: u64,
    new_user_data: u64,
    poll_mask: u32,
    flags: u32,
) void {
    sqe.prep_rw(.POLL_REMOVE, -1, old_user_data, flags, new_user_data);
    // Poll masks previously used to comprise of 16 bits in the flags union of
    // a SQE, but were then extended to comprise of 32 bits in order to make
    // room for additional option flags. To ensure that the correct bits of
    // poll masks are consistently and properly read across multiple kernel
    // versions, poll masks are enforced to be little-endian.
    // https://www.spinics.net/lists/io-uring/msg02848.html
    sqe.rw_flags = std.mem.nativeToLittle(u32, poll_mask);
}