You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
liburing contains a number of header-only functions. Because they are header-only, they cannot be called from Rust.
One of these, io_uring_cq_advance in particular, contains atomic operations necessary to coordinate with the kernel. Since one of the goals of binding to liburing is to let the authors of liburing handle that sort of thing for us, we "re-export" that function through rusturing.c, hence exposing a rust_io_uring_cq_advance function. We don't do this for any other header-only functions.
Maybe we should do this re-export for all header only functions, so uring-sys will be more API-equivalent to liburing.
The text was updated successfully, but these errors were encountered:
In doing this I think it would also be good to rename them to match the liburing names. To do this the extern declaration would change to use the link_name attribute like so:
#[link(name = "rusturing")]extern{#[link_name = "rust_io_uring_cq_advance"]// the name of the function in `rusturing.c`pubfnio_uring_cq_advance(ring:*mutio_uring,nr: libc::c_uint);// etc}
liburing contains a number of header-only functions. Because they are header-only, they cannot be called from Rust.
One of these,
io_uring_cq_advance
in particular, contains atomic operations necessary to coordinate with the kernel. Since one of the goals of binding to liburing is to let the authors of liburing handle that sort of thing for us, we "re-export" that function throughrusturing.c
, hence exposing arust_io_uring_cq_advance
function. We don't do this for any other header-only functions.Maybe we should do this re-export for all header only functions, so uring-sys will be more API-equivalent to liburing.
The text was updated successfully, but these errors were encountered: