Set bounded and unbounded async kernel worker counts to 0, to test registering with registered ring fd.
(fd: FD)
| 75 | /// Set bounded and unbounded async kernel worker counts to 0, to test |
| 76 | /// registering with registered ring fd. |
| 77 | fn register_iowq_max_workers<FD>(fd: FD) -> Result<()> |
| 78 | where |
| 79 | FD: AsFd, |
| 80 | { |
| 81 | let iowq_max_workers = [0_u32; 2]; |
| 82 | do_register( |
| 83 | fd, |
| 84 | true, |
| 85 | IoringRegisterOp::RegisterIowqMaxWorkers, |
| 86 | (&iowq_max_workers as *const [u32; 2] as *mut [u32; 2]).cast::<c_void>(), |
| 87 | 2, |
| 88 | )?; |
| 89 | |
| 90 | Ok(()) |
| 91 | } |
| 92 | |
| 93 | fn register_buf_ring<FD>(fd: FD, reg: &io_uring_buf_reg) -> Result<()> |
| 94 | where |