Crate arceos_posix_api

Source
Expand description

POSIX-compatible APIs for ArceOS modules

Modules§

config
Platform-specific constants and parameters.
ctypes
POSIX C types.

Functions§

sys_acceptnet
Accept for connections on a socket
sys_bindnet
Bind a address to a socket.
sys_clock_gettime
Get clock time since booting
sys_closefd
Close a file by fd.
sys_connectnet
Connects the socket to the address specified.
sys_dupfd
Duplicate a file descriptor.
sys_dup2fd
Duplicate a file descriptor, but it uses the file descriptor number specified in new_fd.
sys_epoll_createepoll and (select or epoll)
Creates a new epoll instance.
sys_epoll_ctlepoll and (select or epoll)
Control interface for an epoll file descriptor
sys_epoll_waitepoll and (select or epoll)
Waits for events on the epoll instance referred to by the file descriptor epfd.
sys_exit
Exit current task
sys_fcntlfd
Manipulate file descriptor.
sys_freeaddrinfonet
Free queried addrinfo struct
sys_fstatfs
Get file metadata by fd and write into buf.
sys_getaddrinfonet
Query addresses for a domain name.
sys_getcwdfs
Get the path of the current directory.
sys_getpeernamenet
Get peer address to which the socket sockfd is connected.
sys_getpid
Get current thread ID.
sys_getrlimit
Get resource limitations
sys_getsocknamenet
Get current address to which the socket sockfd is bound.
sys_listennet
Listen for connections on a socket
sys_lseekfs
Set the position of the file indicated by fd.
sys_lstatfs
Get the metadata of the symbolic link and write into buf.
sys_nanosleep
Sleep some nanoseconds
sys_openfs
Open a file by filename and insert it into the file descriptor table.
sys_pipepipe
Create a pipe
sys_pthread_createmultitask
Create a new thread with the given entry point and argument.
sys_pthread_exitmultitask
Exits the current thread. The value retval will be returned to the joiner.
sys_pthread_joinmultitask
Waits for the given thread to exit, and stores the return value in retval.
sys_pthread_mutex_initmultitask
Initialize a mutex.
sys_pthread_mutex_lockmultitask
Lock the given mutex.
sys_pthread_mutex_unlockmultitask
Unlock the given mutex.
sys_pthread_selfmultitask
Returns the pthread struct of current thread.
sys_read
Read data from the file indicated by fd.
sys_recvnet
Receive a message on a socket.
sys_recvfromnet
Receive a message on a socket and get its source address.
sys_renamefs
Rename old to new If new exists, it is first removed.
sys_sched_yield
Relinquish the CPU, and switches to another task.
sys_selectselect and (select or epoll)
Monitor multiple file descriptors, waiting until one or more of the file descriptors become “ready” for some class of I/O operation
sys_sendnet
Send a message on a socket to the address connected.
sys_sendtonet
Send a message on a socket to the address specified.
sys_setrlimit
Set resource limitations
sys_shutdownnet
Shut down a full-duplex connection.
sys_socketnet
Create an socket for communication.
sys_statfs
Get the file metadata by path and write into buf.
sys_sysconf
Return system configuration infomation
sys_write
Write data to the file indicated by fd.
sys_writev
Write a vector.