Expand description
POSIX-compatible APIs for ArceOS modules
Re-exports§
pub use imp::fd_ops::FD_TABLE;
fd
Modules§
Structs§
- Directory
fs
- Directory wrapper for
axfs::fops::Directory
. - FD_
TABLE fd
- Wrapper struct for the namespace resource
FD_TABLE
- File
fs
- File wrapper for
axfs::fops::File
. - File
Path fs
- 一个规范化的文件路径表示
Constants§
- AT_
FDCWD fs
- A constant representing the current working directory
Statics§
- HARDLINK_
MANAGER fs
- A global hardlink manager
Functions§
- add_
file_ like fd
- Add a file to the file descriptor table.
- char_
ptr_ to_ str - Convert a C string to a Rust string
- get_
file_ like fd
- Get a file by
fd
. - handle_
file_ path fs
- 处理路径并返回规范化后的
FilePath
- sys_
accept ⚠net
- Accept for connections on a socket
- sys_
bind net
- Bind a address to a socket.
- sys_
clock_ ⚠gettime - Get clock time since booting
- sys_
close fd
- Close a file by
fd
. - sys_
connect net
- Connects the socket to the address specified.
- sys_dup
fd
- Duplicate a file descriptor.
- sys_
dup2 fd
- Duplicate a file descriptor, but it uses the file descriptor number specified in
new_fd
. - sys_
epoll_ create epoll
and (select
orepoll
) - Creates a new epoll instance.
- sys_
epoll_ ⚠ctl epoll
and (select
orepoll
) - Control interface for an epoll file descriptor
- sys_
epoll_ ⚠wait epoll
and (select
orepoll
) - Waits for events on the epoll instance referred to by the file descriptor epfd.
- sys_
exit - Exit current task
- sys_
fcntl fd
- Manipulate file descriptor.
- sys_
freeaddrinfo ⚠net
- Free queried
addrinfo
struct - sys_
fstat ⚠fs
- Get file metadata by
fd
and write intobuf
. - sys_
get_ ⚠time_ of_ day - Get current system time and store in specific struct
- sys_
getaddrinfo ⚠net
- Query addresses for a domain name.
- sys_
getcwd fs
- Get the path of the current directory.
- sys_
getpeername ⚠net
- Get peer address to which the socket sockfd is connected.
- sys_
getpid - Get current thread ID.
- sys_
getrlimit ⚠ - Get resource limitations
- sys_
getsockname ⚠net
- Get current address to which the socket sockfd is bound.
- sys_
listen net
- Listen for connections on a socket
- sys_
lseek fs
- Set the position of the file indicated by
fd
. - sys_
lstat ⚠fs
- Get the metadata of the symbolic link and write into
buf
. - sys_
nanosleep ⚠ - Sleep some nanoseconds
- sys_
open fs
- Open a file by
filename
and insert it into the file descriptor table. - sys_
openat fs
- Open or create a file. fd: file descriptor filename: file path to be opened or created flags: open flags mode: see man 7 inode return new file descriptor if succeed, or return -1.
- sys_
pipe pipe
- Create a pipe
- sys_
pthread_ ⚠create multitask
- Create a new thread with the given entry point and argument.
- sys_
pthread_ exit multitask
- Exits the current thread. The value
retval
will be returned to the joiner. - sys_
pthread_ ⚠join multitask
- Waits for the given thread to exit, and stores the return value in
retval
. - sys_
pthread_ mutex_ init multitask
- Initialize a mutex.
- sys_
pthread_ mutex_ lock multitask
- Lock the given mutex.
- sys_
pthread_ mutex_ unlock multitask
- Unlock the given mutex.
- sys_
pthread_ self multitask
- Returns the
pthread
struct of current thread. - sys_
read - Read data from the file indicated by
fd
. - sys_
recv net
- Receive a message on a socket.
- sys_
recvfrom ⚠net
- Receive a message on a socket and get its source address.
- sys_
rename fs
- Rename
old
tonew
If new exists, it is first removed. - sys_
sched_ yield - Relinquish the CPU, and switches to another task.
- sys_
select ⚠select
and (select
orepoll
) - Monitor multiple file descriptors, waiting until one or more of the file descriptors become “ready” for some class of I/O operation
- sys_
send net
- Send a message on a socket to the address connected.
- sys_
sendto net
- Send a message on a socket to the address specified.
- sys_
setrlimit ⚠ - Set resource limitations
- sys_
shutdown net
- Shut down a full-duplex connection.
- sys_
socket net
- Create an socket for communication.
- sys_
stat ⚠fs
- Get the file metadata by
path
and write intobuf
. - sys_
sysconf - Return system configuration infomation
- sys_
write - Write data to the file indicated by
fd
. - sys_
writev ⚠ - Write a vector.