Skip to content

Commit 6ca2e2a

Browse files
committed
feat: add aio for solarish
1 parent 600e1d1 commit 6ca2e2a

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

libc-test/semver/solarish.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
AIO_CANCELED
2+
AIO_ALLDONE
3+
AIO_NOTCANCELED
14
IPV6_DONTFRAG
25
IPV6_PKTINFO
36
IPV6_RECVTCLASS
@@ -6,9 +9,25 @@ IP_DONTFRAG
69
IP_PKTINFO
710
IP_TOS
811
IP_TTL
12+
LIO_NOP
13+
LIO_READ
14+
LIO_WRITE
15+
LIO_NOWAIT
16+
LIO_WAIT
917
PIPE_BUF
18+
SIGEV_PORT
19+
aio_cancel
20+
aio_error
21+
aio_fsync
22+
aio_read
23+
aio_return
24+
aio_suspend
25+
aio_waitn
26+
aio_write
27+
aiocb
1028
bind
1129
in6_pktinfo
1230
in_pktinfo
31+
lio_listio
1332
recvmsg
1433
sendmsg

src/unix/solarish/mod.rs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,24 @@ s! {
420420
pub portnfy_user: *mut ::c_void,
421421
}
422422

423+
pub struct aio_result_t {
424+
aio_return: ::ssize_t,
425+
aio_errno: ::c_int,
426+
}
427+
428+
pub struct aiocb {
429+
pub aio_fildes: ::c_int,
430+
pub aio_buf: *mut ::c_void,
431+
pub aio_nbytes: ::size_t,
432+
pub aio_offset: ::off_t,
433+
pub aio_reqprio: ::c_int,
434+
pub aio_sigevent: sigevent,
435+
pub aio_lio_opcode: ::c_int,
436+
pub aio_resultp: ::aio_result_t,
437+
pub aio_state: ::c_int,
438+
_aio_pad: ::c_int
439+
}
440+
423441
pub struct exit_status {
424442
e_termination: ::c_short,
425443
e_exit: ::c_short,
@@ -1123,9 +1141,19 @@ pub const SIG_BLOCK: ::c_int = 1;
11231141
pub const SIG_UNBLOCK: ::c_int = 2;
11241142
pub const SIG_SETMASK: ::c_int = 3;
11251143

1144+
pub const AIO_CANCELED: ::c_int = 0;
1145+
pub const AIO_ALLDONE: ::c_int = 1;
1146+
pub const AIO_NOTCANCELED: ::c_int = 2;
1147+
pub const LIO_NOP: ::c_int = 0;
1148+
pub const LIO_READ: ::c_int = 1;
1149+
pub const LIO_WRITE: ::c_int = 2;
1150+
pub const LIO_NOWAIT: ::c_int = 0;
1151+
pub const LIO_WAIT: ::c_int = 1;
1152+
11261153
pub const SIGEV_NONE: ::c_int = 1;
11271154
pub const SIGEV_SIGNAL: ::c_int = 2;
11281155
pub const SIGEV_THREAD: ::c_int = 3;
1156+
pub const SIGEV_PORT: ::c_int = 4;
11291157

11301158
pub const CLD_EXITED: ::c_int = 1;
11311159
pub const CLD_KILLED: ::c_int = 2;
@@ -3035,6 +3063,30 @@ extern "C" {
30353063

30363064
pub fn sync();
30373065

3066+
pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
3067+
pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
3068+
pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
3069+
pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
3070+
pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
3071+
pub fn aio_suspend(
3072+
aiocb_list: *const *const aiocb,
3073+
nitems: ::c_int,
3074+
timeout: *const ::timespec,
3075+
) -> ::c_int;
3076+
pub fn aio_waitn(
3077+
aiocb_list: *mut *mut aiocb,
3078+
nent: ::c_int,
3079+
nwait: *mut ::c_int,
3080+
timeout: *const ::timespec,
3081+
);
3082+
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
3083+
pub fn lio_listio(
3084+
mode: ::c_int,
3085+
aiocb_list: *const *mut aiocb,
3086+
nitems: ::c_int,
3087+
sevp: *mut sigevent,
3088+
) -> ::c_int;
3089+
30383090
pub fn __major(version: ::c_int, devnum: ::dev_t) -> ::major_t;
30393091
pub fn __minor(version: ::c_int, devnum: ::dev_t) -> ::minor_t;
30403092
pub fn __makedev(version: ::c_int, majdev: ::major_t, mindev: ::minor_t) -> ::dev_t;

0 commit comments

Comments
 (0)