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
3131 union {
3232 __kernel_rwf_t rw_flags;
3333 __u32 fsync_flags;
34− __u16 poll_events;
34+ __u16 poll_events; /* compatibility */
35+ __u32 poll32_events; /* word-reversed for BE */
3536 __u32 sync_range_flags;
3637 __u32 msg_flags;
3738 __u32 timeout_flags;
@@ -248,6 +249,7 @@ struct io_uring_params { · 210 unmodified lines
248249 #define IORING_FEAT_RW_CUR_POS (1U << 3)
249250 #define IORING_FEAT_CUR_PERSONALITY (1U << 4)
250251 #define IORING_FEAT_FAST_POLL (1U << 5)
252+#define IORING_FEAT_POLL_32BITS (1U << 6)
251253
252254 /*
253255 * io_uring_register(2) opcodes and arguments