Trait open_coroutine_core::syscall::UnixSyscall
source · pub trait UnixSyscall {
Show 25 methods
// Required methods
extern "C" fn sleep(
&self,
fn_ptr: Option<&extern "C" fn(_: c_uint) -> c_uint>,
secs: c_uint
) -> c_uint;
extern "C" fn usleep(
&self,
fn_ptr: Option<&extern "C" fn(_: c_uint) -> c_int>,
microseconds: c_uint
) -> c_int;
extern "C" fn nanosleep(
&self,
fn_ptr: Option<&extern "C" fn(_: *const timespec, _: *mut timespec) -> c_int>,
rqtp: *const timespec,
rmtp: *mut timespec
) -> c_int;
extern "C" fn poll(
&self,
fn_ptr: Option<&extern "C" fn(_: *mut pollfd, _: nfds_t, _: c_int) -> c_int>,
fds: *mut pollfd,
nfds: nfds_t,
timeout: c_int
) -> c_int;
extern "C" fn select(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut fd_set, _: *mut fd_set, _: *mut fd_set, _: *mut timeval) -> c_int>,
nfds: c_int,
readfds: *mut fd_set,
writefds: *mut fd_set,
errorfds: *mut fd_set,
timeout: *mut timeval
) -> c_int;
extern "C" fn socket(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: c_int, _: c_int) -> c_int>,
domain: c_int,
ty: c_int,
protocol: c_int
) -> c_int;
extern "C" fn listen(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: c_int) -> c_int>,
socket: c_int,
backlog: c_int
) -> c_int;
extern "C" fn accept(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut sockaddr, _: *mut socklen_t) -> c_int>,
socket: c_int,
address: *mut sockaddr,
address_len: *mut socklen_t
) -> c_int;
extern "C" fn connect(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *const sockaddr, _: socklen_t) -> c_int>,
socket: c_int,
address: *const sockaddr,
len: socklen_t
) -> c_int;
extern "C" fn shutdown(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: c_int) -> c_int>,
socket: c_int,
how: c_int
) -> c_int;
extern "C" fn close(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int) -> c_int>,
fd: c_int
) -> c_int;
extern "C" fn recv(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut c_void, _: size_t, _: c_int) -> ssize_t>,
socket: c_int,
buf: *mut c_void,
len: size_t,
flags: c_int
) -> ssize_t;
extern "C" fn recvfrom(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut c_void, _: size_t, _: c_int, _: *mut sockaddr, _: *mut socklen_t) -> ssize_t>,
socket: c_int,
buf: *mut c_void,
len: size_t,
flags: c_int,
addr: *mut sockaddr,
addrlen: *mut socklen_t
) -> ssize_t;
extern "C" fn read(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut c_void, _: size_t) -> ssize_t>,
fd: c_int,
buf: *mut c_void,
count: size_t
) -> ssize_t;
extern "C" fn pread(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut c_void, _: size_t, _: off_t) -> ssize_t>,
fd: c_int,
buf: *mut c_void,
count: size_t,
offset: off_t
) -> ssize_t;
extern "C" fn readv(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *const iovec, _: c_int) -> ssize_t>,
fd: c_int,
iov: *const iovec,
iovcnt: c_int
) -> ssize_t;
extern "C" fn preadv(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *const iovec, _: c_int, _: off_t) -> ssize_t>,
fd: c_int,
iov: *const iovec,
iovcnt: c_int,
offset: off_t
) -> ssize_t;
extern "C" fn recvmsg(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut msghdr, _: c_int) -> ssize_t>,
fd: c_int,
msg: *mut msghdr,
flags: c_int
) -> ssize_t;
extern "C" fn send(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *const c_void, _: size_t, _: c_int) -> ssize_t>,
socket: c_int,
buf: *const c_void,
len: size_t,
flags: c_int
) -> ssize_t;
extern "C" fn sendto(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *const c_void, _: size_t, _: c_int, _: *const sockaddr, _: socklen_t) -> ssize_t>,
socket: c_int,
buf: *const c_void,
len: size_t,
flags: c_int,
addr: *const sockaddr,
addrlen: socklen_t
) -> ssize_t;
extern "C" fn write(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *const c_void, _: size_t) -> ssize_t>,
fd: c_int,
buf: *const c_void,
count: size_t
) -> ssize_t;
extern "C" fn pwrite(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *const c_void, _: size_t, _: off_t) -> ssize_t>,
fd: c_int,
buf: *const c_void,
count: size_t,
offset: off_t
) -> ssize_t;
extern "C" fn writev(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *const iovec, _: c_int) -> ssize_t>,
fd: c_int,
iov: *const iovec,
iovcnt: c_int
) -> ssize_t;
extern "C" fn pwritev(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *const iovec, _: c_int, _: off_t) -> ssize_t>,
fd: c_int,
iov: *const iovec,
iovcnt: c_int,
offset: off_t
) -> ssize_t;
extern "C" fn sendmsg(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *const msghdr, _: c_int) -> ssize_t>,
fd: c_int,
msg: *const msghdr,
flags: c_int
) -> ssize_t;
}
Required Methods§
sourceextern "C" fn sleep(
&self,
fn_ptr: Option<&extern "C" fn(_: c_uint) -> c_uint>,
secs: c_uint
) -> c_uint
extern "C" fn sleep( &self, fn_ptr: Option<&extern "C" fn(_: c_uint) -> c_uint>, secs: c_uint ) -> c_uint
sleep
extern "C" fn usleep( &self, fn_ptr: Option<&extern "C" fn(_: c_uint) -> c_int>, microseconds: c_uint ) -> c_int
extern "C" fn nanosleep( &self, fn_ptr: Option<&extern "C" fn(_: *const timespec, _: *mut timespec) -> c_int>, rqtp: *const timespec, rmtp: *mut timespec ) -> c_int
sourceextern "C" fn poll(
&self,
fn_ptr: Option<&extern "C" fn(_: *mut pollfd, _: nfds_t, _: c_int) -> c_int>,
fds: *mut pollfd,
nfds: nfds_t,
timeout: c_int
) -> c_int
extern "C" fn poll( &self, fn_ptr: Option<&extern "C" fn(_: *mut pollfd, _: nfds_t, _: c_int) -> c_int>, fds: *mut pollfd, nfds: nfds_t, timeout: c_int ) -> c_int
poll
extern "C" fn select( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut fd_set, _: *mut fd_set, _: *mut fd_set, _: *mut timeval) -> c_int>, nfds: c_int, readfds: *mut fd_set, writefds: *mut fd_set, errorfds: *mut fd_set, timeout: *mut timeval ) -> c_int
sourceextern "C" fn socket(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: c_int, _: c_int) -> c_int>,
domain: c_int,
ty: c_int,
protocol: c_int
) -> c_int
extern "C" fn socket( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: c_int, _: c_int) -> c_int>, domain: c_int, ty: c_int, protocol: c_int ) -> c_int
socket
extern "C" fn listen( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: c_int) -> c_int>, socket: c_int, backlog: c_int ) -> c_int
extern "C" fn accept( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut sockaddr, _: *mut socklen_t) -> c_int>, socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t ) -> c_int
extern "C" fn connect( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: *const sockaddr, _: socklen_t) -> c_int>, socket: c_int, address: *const sockaddr, len: socklen_t ) -> c_int
extern "C" fn shutdown( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: c_int) -> c_int>, socket: c_int, how: c_int ) -> c_int
extern "C" fn close( &self, fn_ptr: Option<&extern "C" fn(_: c_int) -> c_int>, fd: c_int ) -> c_int
sourceextern "C" fn recv(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut c_void, _: size_t, _: c_int) -> ssize_t>,
socket: c_int,
buf: *mut c_void,
len: size_t,
flags: c_int
) -> ssize_t
extern "C" fn recv( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut c_void, _: size_t, _: c_int) -> ssize_t>, socket: c_int, buf: *mut c_void, len: size_t, flags: c_int ) -> ssize_t
read
extern "C" fn recvfrom( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut c_void, _: size_t, _: c_int, _: *mut sockaddr, _: *mut socklen_t) -> ssize_t>, socket: c_int, buf: *mut c_void, len: size_t, flags: c_int, addr: *mut sockaddr, addrlen: *mut socklen_t ) -> ssize_t
extern "C" fn read( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut c_void, _: size_t) -> ssize_t>, fd: c_int, buf: *mut c_void, count: size_t ) -> ssize_t
extern "C" fn pread( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut c_void, _: size_t, _: off_t) -> ssize_t>, fd: c_int, buf: *mut c_void, count: size_t, offset: off_t ) -> ssize_t
extern "C" fn readv( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: *const iovec, _: c_int) -> ssize_t>, fd: c_int, iov: *const iovec, iovcnt: c_int ) -> ssize_t
extern "C" fn preadv( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: *const iovec, _: c_int, _: off_t) -> ssize_t>, fd: c_int, iov: *const iovec, iovcnt: c_int, offset: off_t ) -> ssize_t
extern "C" fn recvmsg( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: *mut msghdr, _: c_int) -> ssize_t>, fd: c_int, msg: *mut msghdr, flags: c_int ) -> ssize_t
sourceextern "C" fn send(
&self,
fn_ptr: Option<&extern "C" fn(_: c_int, _: *const c_void, _: size_t, _: c_int) -> ssize_t>,
socket: c_int,
buf: *const c_void,
len: size_t,
flags: c_int
) -> ssize_t
extern "C" fn send( &self, fn_ptr: Option<&extern "C" fn(_: c_int, _: *const c_void, _: size_t, _: c_int) -> ssize_t>, socket: c_int, buf: *const c_void, len: size_t, flags: c_int ) -> ssize_t
write