44#![ warn( missing_docs) ]
55
66#[ allow( clippy:: undocumented_unsafe_blocks) ]
7- mod bindings ;
7+ mod gen ;
88pub mod operation;
99mod probe;
1010mod queue;
@@ -16,7 +16,7 @@ use std::fs::File;
1616use std:: io:: Error as IOError ;
1717use std:: os:: unix:: io:: { AsRawFd , FromRawFd , RawFd } ;
1818
19- use bindings :: io_uring_params;
19+ use gen :: io_uring_params;
2020use operation:: { Cqe , FixedFd , OpCode , Operation } ;
2121use probe:: { ProbeWrapper , PROBE_LEN } ;
2222pub use queue:: completion:: CQueueError ;
@@ -112,7 +112,7 @@ impl<T: Debug> IoUring<T> {
112112 ) -> Result < Self , IoUringError > {
113113 let mut params = io_uring_params {
114114 // Create the ring as disabled, so that we may register restrictions.
115- flags : bindings :: IORING_SETUP_R_DISABLED ,
115+ flags : gen :: IORING_SETUP_R_DISABLED ,
116116
117117 ..Default :: default ( )
118118 } ;
@@ -252,7 +252,7 @@ impl<T: Debug> IoUring<T> {
252252 libc:: syscall (
253253 libc:: SYS_io_uring_register ,
254254 self . fd . as_raw_fd ( ) ,
255- bindings :: IORING_REGISTER_ENABLE_RINGS ,
255+ gen :: IORING_REGISTER_ENABLE_RINGS ,
256256 std:: ptr:: null :: < libc:: c_void > ( ) ,
257257 0 ,
258258 )
@@ -277,7 +277,7 @@ impl<T: Debug> IoUring<T> {
277277 libc:: syscall (
278278 libc:: SYS_io_uring_register ,
279279 self . fd . as_raw_fd ( ) ,
280- bindings :: IORING_REGISTER_FILES ,
280+ gen :: IORING_REGISTER_FILES ,
281281 files
282282 . iter ( )
283283 . map ( |f| f. as_raw_fd ( ) )
@@ -301,7 +301,7 @@ impl<T: Debug> IoUring<T> {
301301 libc:: syscall (
302302 libc:: SYS_io_uring_register ,
303303 self . fd . as_raw_fd ( ) ,
304- bindings :: IORING_REGISTER_EVENTFD ,
304+ gen :: IORING_REGISTER_EVENTFD ,
305305 ( & fd) as * const _ ,
306306 1 ,
307307 )
@@ -320,10 +320,10 @@ impl<T: Debug> IoUring<T> {
320320 libc:: syscall (
321321 libc:: SYS_io_uring_register ,
322322 self . fd . as_raw_fd ( ) ,
323- bindings :: IORING_REGISTER_RESTRICTIONS ,
323+ gen :: IORING_REGISTER_RESTRICTIONS ,
324324 restrictions
325325 . iter ( )
326- . map ( bindings :: io_uring_restriction:: from)
326+ . map ( gen :: io_uring_restriction:: from)
327327 . collect :: < Vec < _ > > ( )
328328 . as_mut_slice ( )
329329 . as_mut_ptr ( ) ,
@@ -341,7 +341,7 @@ impl<T: Debug> IoUring<T> {
341341 // An alternative fix would be to keep an internal counter that tracks the number of
342342 // submitted entries that haven't been completed and makes sure it doesn't exceed
343343 // (2 * num_entries).
344- if ( params. features & bindings :: IORING_FEAT_NODROP ) == 0 {
344+ if ( params. features & gen :: IORING_FEAT_NODROP ) == 0 {
345345 return Err ( IoUringError :: UnsupportedFeature ( "IORING_FEAT_NODROP" ) ) ;
346346 }
347347
@@ -356,7 +356,7 @@ impl<T: Debug> IoUring<T> {
356356 libc:: syscall (
357357 libc:: SYS_io_uring_register ,
358358 self . fd . as_raw_fd ( ) ,
359- bindings :: IORING_REGISTER_PROBE ,
359+ gen :: IORING_REGISTER_PROBE ,
360360 probes. as_mut_fam_struct_ptr ( ) ,
361361 PROBE_LEN ,
362362 )
@@ -367,7 +367,7 @@ impl<T: Debug> IoUring<T> {
367367 let supported_opcodes: HashSet < u8 > = probes
368368 . as_slice ( )
369369 . iter ( )
370- . filter ( |op| ( ( u32:: from ( op. flags ) ) & bindings :: IO_URING_OP_SUPPORTED ) != 0 )
370+ . filter ( |op| ( ( u32:: from ( op. flags ) ) & gen :: IO_URING_OP_SUPPORTED ) != 0 )
371371 . map ( |op| op. op )
372372 . collect ( ) ;
373373
0 commit comments