History

io_uring: change the poll type to be 32-bits

poll events should be 32-bits to cover EPOLLEXCLUSIVE. Explicit word-swap the poll32_events for big endian to make sure the ABI is not changed. We call this feature IORING_FEAT_POLL_32BITS, applications who want to use EPOLLEXCLUSIVE should check the feature bit first.

Jiufei Xue committed 6 years ago

Commit 5769a351 parent 48778463 files · +17 −6Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/io_uring.h+3−1
@@ -31,7 +31,8 @@ struct io_uring_sqe { · 30 unmodified lines
31 union {31 union {
32 __kernel_rwf_t rw_flags;32 __kernel_rwf_t rw_flags;
33 __u32 fsync_flags;33 __u32 fsync_flags;
34 __u16 poll_events;34 __u16 poll_events; /* compatibility */
35 __u32 poll32_events; /* word-reversed for BE */
35 __u32 sync_range_flags;36 __u32 sync_range_flags;
36 __u32 msg_flags;37 __u32 msg_flags;
37 __u32 timeout_flags;38 __u32 timeout_flags;
@@ -248,6 +249,7 @@ struct io_uring_params { · 210 unmodified lines
248#define IORING_FEAT_RW_CUR_POS (1U << 3)249#define IORING_FEAT_RW_CUR_POS (1U << 3)
249#define IORING_FEAT_CUR_PERSONALITY (1U << 4)250#define IORING_FEAT_CUR_PERSONALITY (1U << 4)
250#define IORING_FEAT_FAST_POLL (1U << 5)251#define IORING_FEAT_FAST_POLL (1U << 5)
252#define IORING_FEAT_POLL_32BITS (1U << 6)
251 253
252/*254/*
253 * io_uring_register(2) opcodes and arguments255 * io_uring_register(2) opcodes and arguments