@@ -91,7 +91,11 @@ pub const IORING_SETUP_SQE128: u32 = 1024;
91
91
pub const IORING_SETUP_CQE32 : u32 = 2048 ;
92
92
pub const IORING_SETUP_SINGLE_ISSUER : u32 = 4096 ;
93
93
pub const IORING_SETUP_DEFER_TASKRUN : u32 = 8192 ;
94
+ pub const IORING_SETUP_NO_MMAP : u32 = 16384 ;
95
+ pub const IORING_SETUP_REGISTERED_FD_ONLY : u32 = 32768 ;
96
+ pub const IORING_SETUP_NO_SQARRAY : u32 = 65536 ;
94
97
pub const IORING_URING_CMD_FIXED : u32 = 1 ;
98
+ pub const IORING_URING_CMD_MASK : u32 = 1 ;
95
99
pub const IORING_FSYNC_DATASYNC : u32 = 1 ;
96
100
pub const IORING_TIMEOUT_ABS : u32 = 1 ;
97
101
pub const IORING_TIMEOUT_UPDATE : u32 = 2 ;
@@ -111,6 +115,8 @@ pub const IORING_ASYNC_CANCEL_ALL: u32 = 1;
111
115
pub const IORING_ASYNC_CANCEL_FD : u32 = 2 ;
112
116
pub const IORING_ASYNC_CANCEL_ANY : u32 = 4 ;
113
117
pub const IORING_ASYNC_CANCEL_FD_FIXED : u32 = 8 ;
118
+ pub const IORING_ASYNC_CANCEL_USERDATA : u32 = 16 ;
119
+ pub const IORING_ASYNC_CANCEL_OP : u32 = 32 ;
114
120
pub const IORING_RECVSEND_POLL_FIRST : u32 = 1 ;
115
121
pub const IORING_RECV_MULTISHOT : u32 = 2 ;
116
122
pub const IORING_RECVSEND_FIXED_BUF : u32 = 4 ;
@@ -376,6 +382,55 @@ impl Default for io_uring_sqe__bindgen_ty_1 {
376
382
pub union io_uring_sqe__bindgen_ty_2 {
377
383
pub addr : __u64 ,
378
384
pub splice_off_in : __u64 ,
385
+ pub __bindgen_anon_1 : io_uring_sqe__bindgen_ty_2__bindgen_ty_1 ,
386
+ }
387
+ #[ repr( C ) ]
388
+ #[ derive( Debug , Default , Copy , Clone ) ]
389
+ pub struct io_uring_sqe__bindgen_ty_2__bindgen_ty_1 {
390
+ pub level : __u32 ,
391
+ pub optname : __u32 ,
392
+ }
393
+ #[ test]
394
+ fn bindgen_test_layout_io_uring_sqe__bindgen_ty_2__bindgen_ty_1 ( ) {
395
+ const UNINIT : :: core:: mem:: MaybeUninit < io_uring_sqe__bindgen_ty_2__bindgen_ty_1 > =
396
+ :: core:: mem:: MaybeUninit :: uninit ( ) ;
397
+ let ptr = UNINIT . as_ptr ( ) ;
398
+ assert_eq ! (
399
+ :: core:: mem:: size_of:: <io_uring_sqe__bindgen_ty_2__bindgen_ty_1>( ) ,
400
+ 8usize ,
401
+ concat!(
402
+ "Size of: " ,
403
+ stringify!( io_uring_sqe__bindgen_ty_2__bindgen_ty_1)
404
+ )
405
+ ) ;
406
+ assert_eq ! (
407
+ :: core:: mem:: align_of:: <io_uring_sqe__bindgen_ty_2__bindgen_ty_1>( ) ,
408
+ 4usize ,
409
+ concat!(
410
+ "Alignment of " ,
411
+ stringify!( io_uring_sqe__bindgen_ty_2__bindgen_ty_1)
412
+ )
413
+ ) ;
414
+ assert_eq ! (
415
+ unsafe { :: core:: ptr:: addr_of!( ( * ptr) . level) as usize - ptr as usize } ,
416
+ 0usize ,
417
+ concat!(
418
+ "Offset of field: " ,
419
+ stringify!( io_uring_sqe__bindgen_ty_2__bindgen_ty_1) ,
420
+ "::" ,
421
+ stringify!( level)
422
+ )
423
+ ) ;
424
+ assert_eq ! (
425
+ unsafe { :: core:: ptr:: addr_of!( ( * ptr) . optname) as usize - ptr as usize } ,
426
+ 4usize ,
427
+ concat!(
428
+ "Offset of field: " ,
429
+ stringify!( io_uring_sqe__bindgen_ty_2__bindgen_ty_1) ,
430
+ "::" ,
431
+ stringify!( optname)
432
+ )
433
+ ) ;
379
434
}
380
435
#[ test]
381
436
fn bindgen_test_layout_io_uring_sqe__bindgen_ty_2 ( ) {
@@ -444,6 +499,8 @@ pub union io_uring_sqe__bindgen_ty_3 {
444
499
pub xattr_flags : __u32 ,
445
500
pub msg_ring_flags : __u32 ,
446
501
pub uring_cmd_flags : __u32 ,
502
+ pub waitid_flags : __u32 ,
503
+ pub futex_flags : __u32 ,
447
504
}
448
505
#[ test]
449
506
fn bindgen_test_layout_io_uring_sqe__bindgen_ty_3 ( ) {
@@ -650,6 +707,26 @@ fn bindgen_test_layout_io_uring_sqe__bindgen_ty_3() {
650
707
stringify!( uring_cmd_flags)
651
708
)
652
709
) ;
710
+ assert_eq ! (
711
+ unsafe { :: core:: ptr:: addr_of!( ( * ptr) . waitid_flags) as usize - ptr as usize } ,
712
+ 0usize ,
713
+ concat!(
714
+ "Offset of field: " ,
715
+ stringify!( io_uring_sqe__bindgen_ty_3) ,
716
+ "::" ,
717
+ stringify!( waitid_flags)
718
+ )
719
+ ) ;
720
+ assert_eq ! (
721
+ unsafe { :: core:: ptr:: addr_of!( ( * ptr) . futex_flags) as usize - ptr as usize } ,
722
+ 0usize ,
723
+ concat!(
724
+ "Offset of field: " ,
725
+ stringify!( io_uring_sqe__bindgen_ty_3) ,
726
+ "::" ,
727
+ stringify!( futex_flags)
728
+ )
729
+ ) ;
653
730
}
654
731
impl Default for io_uring_sqe__bindgen_ty_3 {
655
732
fn default ( ) -> Self {
@@ -716,6 +793,7 @@ impl Default for io_uring_sqe__bindgen_ty_4 {
716
793
pub union io_uring_sqe__bindgen_ty_5 {
717
794
pub splice_fd_in : __s32 ,
718
795
pub file_index : __u32 ,
796
+ pub optlen : __u32 ,
719
797
pub __bindgen_anon_1 : io_uring_sqe__bindgen_ty_5__bindgen_ty_1 ,
720
798
}
721
799
#[ repr( C ) ]
@@ -801,6 +879,16 @@ fn bindgen_test_layout_io_uring_sqe__bindgen_ty_5() {
801
879
stringify!( file_index)
802
880
)
803
881
) ;
882
+ assert_eq ! (
883
+ unsafe { :: core:: ptr:: addr_of!( ( * ptr) . optlen) as usize - ptr as usize } ,
884
+ 0usize ,
885
+ concat!(
886
+ "Offset of field: " ,
887
+ stringify!( io_uring_sqe__bindgen_ty_5) ,
888
+ "::" ,
889
+ stringify!( optlen)
890
+ )
891
+ ) ;
804
892
}
805
893
impl Default for io_uring_sqe__bindgen_ty_5 {
806
894
fn default ( ) -> Self {
@@ -814,6 +902,7 @@ impl Default for io_uring_sqe__bindgen_ty_5 {
814
902
#[ repr( C ) ]
815
903
pub struct io_uring_sqe__bindgen_ty_6 {
816
904
pub __bindgen_anon_1 : __BindgenUnionField < io_uring_sqe__bindgen_ty_6__bindgen_ty_1 > ,
905
+ pub optval : __BindgenUnionField < __u64 > ,
817
906
pub cmd : __BindgenUnionField < [ __u8 ; 0usize ] > ,
818
907
pub bindgen_union_field : [ u64 ; 2usize ] ,
819
908
}
@@ -880,6 +969,16 @@ fn bindgen_test_layout_io_uring_sqe__bindgen_ty_6() {
880
969
8usize ,
881
970
concat!( "Alignment of " , stringify!( io_uring_sqe__bindgen_ty_6) )
882
971
) ;
972
+ assert_eq ! (
973
+ unsafe { :: core:: ptr:: addr_of!( ( * ptr) . optval) as usize - ptr as usize } ,
974
+ 0usize ,
975
+ concat!(
976
+ "Offset of field: " ,
977
+ stringify!( io_uring_sqe__bindgen_ty_6) ,
978
+ "::" ,
979
+ stringify!( optval)
980
+ )
981
+ ) ;
883
982
assert_eq ! (
884
983
unsafe { :: core:: ptr:: addr_of!( ( * ptr) . cmd) as usize - ptr as usize } ,
885
984
0usize ,
@@ -1051,7 +1150,12 @@ pub const IORING_OP_SOCKET: io_uring_op = 45;
1051
1150
pub const IORING_OP_URING_CMD : io_uring_op = 46 ;
1052
1151
pub const IORING_OP_SEND_ZC : io_uring_op = 47 ;
1053
1152
pub const IORING_OP_SENDMSG_ZC : io_uring_op = 48 ;
1054
- pub const IORING_OP_LAST : io_uring_op = 49 ;
1153
+ pub const IORING_OP_READ_MULTISHOT : io_uring_op = 49 ;
1154
+ pub const IORING_OP_WAITID : io_uring_op = 50 ;
1155
+ pub const IORING_OP_FUTEX_WAIT : io_uring_op = 51 ;
1156
+ pub const IORING_OP_FUTEX_WAKE : io_uring_op = 52 ;
1157
+ pub const IORING_OP_FUTEX_WAITV : io_uring_op = 53 ;
1158
+ pub const IORING_OP_LAST : io_uring_op = 54 ;
1055
1159
pub type io_uring_op = libc:: c_uint ;
1056
1160
pub const IORING_MSG_DATA : _bindgen_ty_5 = 0 ;
1057
1161
pub const IORING_MSG_SEND_FD : _bindgen_ty_5 = 1 ;
@@ -1132,7 +1236,7 @@ pub struct io_sqring_offsets {
1132
1236
pub dropped : __u32 ,
1133
1237
pub array : __u32 ,
1134
1238
pub resv1 : __u32 ,
1135
- pub resv2 : __u64 ,
1239
+ pub user_addr : __u64 ,
1136
1240
}
1137
1241
#[ test]
1138
1242
fn bindgen_test_layout_io_sqring_offsets ( ) {
@@ -1229,13 +1333,13 @@ fn bindgen_test_layout_io_sqring_offsets() {
1229
1333
)
1230
1334
) ;
1231
1335
assert_eq ! (
1232
- unsafe { :: core:: ptr:: addr_of!( ( * ptr) . resv2 ) as usize - ptr as usize } ,
1336
+ unsafe { :: core:: ptr:: addr_of!( ( * ptr) . user_addr ) as usize - ptr as usize } ,
1233
1337
32usize ,
1234
1338
concat!(
1235
1339
"Offset of field: " ,
1236
1340
stringify!( io_sqring_offsets) ,
1237
1341
"::" ,
1238
- stringify!( resv2 )
1342
+ stringify!( user_addr )
1239
1343
)
1240
1344
) ;
1241
1345
}
@@ -1250,7 +1354,7 @@ pub struct io_cqring_offsets {
1250
1354
pub cqes : __u32 ,
1251
1355
pub flags : __u32 ,
1252
1356
pub resv1 : __u32 ,
1253
- pub resv2 : __u64 ,
1357
+ pub user_addr : __u64 ,
1254
1358
}
1255
1359
#[ test]
1256
1360
fn bindgen_test_layout_io_cqring_offsets ( ) {
@@ -1347,13 +1451,13 @@ fn bindgen_test_layout_io_cqring_offsets() {
1347
1451
)
1348
1452
) ;
1349
1453
assert_eq ! (
1350
- unsafe { :: core:: ptr:: addr_of!( ( * ptr) . resv2 ) as usize - ptr as usize } ,
1454
+ unsafe { :: core:: ptr:: addr_of!( ( * ptr) . user_addr ) as usize - ptr as usize } ,
1351
1455
32usize ,
1352
1456
concat!(
1353
1457
"Offset of field: " ,
1354
1458
stringify!( io_cqring_offsets) ,
1355
1459
"::" ,
1356
- stringify!( resv2 )
1460
+ stringify!( user_addr )
1357
1461
)
1358
1462
) ;
1359
1463
}
@@ -2455,7 +2559,9 @@ pub struct io_uring_sync_cancel_reg {
2455
2559
pub fd : __s32 ,
2456
2560
pub flags : __u32 ,
2457
2561
pub timeout : __kernel_timespec ,
2458
- pub pad : [ __u64 ; 4usize ] ,
2562
+ pub opcode : __u8 ,
2563
+ pub pad : [ __u8 ; 7usize ] ,
2564
+ pub pad2 : [ __u64 ; 3usize ] ,
2459
2565
}
2460
2566
#[ test]
2461
2567
fn bindgen_test_layout_io_uring_sync_cancel_reg ( ) {
@@ -2513,15 +2619,35 @@ fn bindgen_test_layout_io_uring_sync_cancel_reg() {
2513
2619
)
2514
2620
) ;
2515
2621
assert_eq ! (
2516
- unsafe { :: core:: ptr:: addr_of!( ( * ptr) . pad ) as usize - ptr as usize } ,
2622
+ unsafe { :: core:: ptr:: addr_of!( ( * ptr) . opcode ) as usize - ptr as usize } ,
2517
2623
32usize ,
2624
+ concat!(
2625
+ "Offset of field: " ,
2626
+ stringify!( io_uring_sync_cancel_reg) ,
2627
+ "::" ,
2628
+ stringify!( opcode)
2629
+ )
2630
+ ) ;
2631
+ assert_eq ! (
2632
+ unsafe { :: core:: ptr:: addr_of!( ( * ptr) . pad) as usize - ptr as usize } ,
2633
+ 33usize ,
2518
2634
concat!(
2519
2635
"Offset of field: " ,
2520
2636
stringify!( io_uring_sync_cancel_reg) ,
2521
2637
"::" ,
2522
2638
stringify!( pad)
2523
2639
)
2524
2640
) ;
2641
+ assert_eq ! (
2642
+ unsafe { :: core:: ptr:: addr_of!( ( * ptr) . pad2) as usize - ptr as usize } ,
2643
+ 40usize ,
2644
+ concat!(
2645
+ "Offset of field: " ,
2646
+ stringify!( io_uring_sync_cancel_reg) ,
2647
+ "::" ,
2648
+ stringify!( pad2)
2649
+ )
2650
+ ) ;
2525
2651
}
2526
2652
#[ repr( C ) ]
2527
2653
#[ derive( Debug , Default , Copy , Clone ) ]
0 commit comments