Expand description
POSIX-compatible APIs for ArceOS modules
Re-exports§
pub use imp::fd_ops::FD_TABLE;
fd
pub use imp::fd_ops::FD_TABLE;
fd
Modules§
- Platform-specific constants and parameters.
- POSIX C types.
Structs§
- Directory wrapper for
axfs::fops::Directory
. - FD_
TABLE fd
Wrapper struct for the namespace resourceFD_TABLE
- File
fs
File wrapper foraxfs::fops::File
. - File
Path fs
一个规范化的文件路径表示
Constants§
- AT_
FDCWD fs
A constant representing the current working directory
Statics§
- A global hardlink manager
Functions§
- Add a file to the file descriptor table.
- Convert a C string to a Rust string
- Get a file by
fd
. - 处理路径并返回规范化后的
FilePath
- sys_
accept ⚠net
Accept for connections on a socket - sys_
bind net
Bind a address to a socket. - Get clock time since booting
- 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 innew_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. - Exit current task
- Manipulate file descriptor.
- sys_
freeaddrinfo ⚠net
Free queriedaddrinfo
struct - sys_
fstat ⚠fs
Get file metadata byfd
and write intobuf
. - Get current system time and store in specific struct
- sys_
getaddrinfo ⚠net
Query addresses for a domain name. - Get the path of the current directory.
- sys_
getpeername ⚠net
Get peer address to which the socket sockfd is connected. - Get current thread ID.
- 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 - Set the position of the file indicated by
fd
. - sys_
lstat ⚠fs
Get the metadata of the symbolic link and write intobuf
. - Sleep some nanoseconds
- sys_
open fs
Open a file byfilename
and insert it into the file descriptor table. - 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 valueretval
will be returned to the joiner. - sys_
pthread_ ⚠join multitask
Waits for the given thread to exit, and stores the return value inretval
. - 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 thepthread
struct of current thread. - 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. - Rename
old
tonew
If new exists, it is first removed. - 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. - 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 bypath
and write intobuf
. - Return system configuration infomation
- Write data to the file indicated by
fd
. - Write a vector.