Skip to main content

relibc/header/_aio/
mod.rs

1//! `aio.h` implementation.
2//!
3//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/aio.h.html>.
4
5use crate::{
6    header::{signal::sigevent, time::timespec},
7    platform::types::{c_int, c_void, size_t, ssize_t},
8};
9
10/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/aio.h.html>.
11pub struct aiocb {
12    pub aio_fildes: c_int,
13    pub aio_lio_opcode: c_int,
14    pub aio_reqprio: c_int,
15    pub aio_buf: *mut c_void,
16    pub aio_nbytes: size_t,
17    pub aio_sigevent: sigevent,
18}
19
20/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/aio_read.html>.
21// #[unsafe(no_mangle)]
22pub unsafe extern "C" fn aio_read(aiocbp: *mut aiocb) -> c_int {
23    unimplemented!();
24}
25
26/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/aio_write.html>.
27// #[unsafe(no_mangle)]
28pub unsafe extern "C" fn aio_write(aiocbp: *mut aiocb) -> c_int {
29    unimplemented!();
30}
31
32/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/lio_listio.html>.
33// #[unsafe(no_mangle)]
34pub unsafe extern "C" fn lio_listio(
35    mode: c_int,
36    list: *const *const aiocb,
37    nent: c_int,
38    sig: *mut sigevent,
39) -> c_int {
40    unimplemented!();
41}
42
43/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/aio_error.html>.
44// #[unsafe(no_mangle)]
45pub unsafe extern "C" fn aio_error(aiocbp: *const aiocb) -> c_int {
46    unimplemented!();
47}
48
49/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/aio_return.html>.
50// #[unsafe(no_mangle)]
51pub unsafe extern "C" fn aio_return(aiocbp: *mut aiocb) -> ssize_t {
52    unimplemented!();
53}
54
55/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/aio_cancel.html>.
56// #[unsafe(no_mangle)]
57pub unsafe extern "C" fn aio_cancel(fildes: c_int, aiocbp: *mut aiocb) -> c_int {
58    unimplemented!();
59}
60
61/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/aio_suspend.html>.
62// #[unsafe(no_mangle)]
63pub unsafe extern "C" fn aio_suspend(
64    list: *const *const aiocb,
65    nent: c_int,
66    timeout: *const timespec,
67) -> c_int {
68    unimplemented!();
69}
70
71/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/aio_fsync.html>.
72// #[unsafe(no_mangle)]
73pub unsafe extern "C" fn aio_fsync(operation: c_int, aiocbp: *mut aiocb) -> c_int {
74    unimplemented!();
75}