MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / unregister_ring

Function unregister_ring

tests/io_uring/register.rs:56–73  ·  view source on GitHub ↗
(fd: FD)

Source from the content-addressed store, hash-verified

54}
55
56fn unregister_ring<FD>(fd: FD) -> Result<()>
57where
58 FD: AsRawFd + AsFd,
59{
60 let mut update = io_uring_rsrc_update::default();
61 update.offset = fd.as_raw_fd() as u32;
62 update.data = io_uring_ptr::null();
63
64 do_register(
65 fd,
66 true,
67 IoringRegisterOp::UnregisterRingFds,
68 (&update as *const io_uring_rsrc_update as *mut io_uring_rsrc_update).cast::<c_void>(),
69 1,
70 )?;
71
72 Ok(())
73}
74
75/// Set bounded and unbounded async kernel worker counts to 0, to test
76/// registering with registered ring fd.

Callers 1

Calls 2

do_registerFunction · 0.85
as_raw_fdMethod · 0.45

Tested by 1