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_accept
Accept for connections on a socket
sys_bind
Bind a address to a socket.
sys_clock_gettime
Get clock time since booting
sys_close
Close a file by fd.
sys_connect
Connects the socket to the address specified.
sys_dup
Duplicate a file descriptor.
sys_dup2
Duplicate a file descriptor, but it uses the file descriptor number specified in new_fd.
sys_epoll_create
Creates a new epoll instance.
sys_epoll_ctl
Control interface for an epoll file descriptor
sys_epoll_wait
Waits for events on the epoll instance referred to by the file descriptor epfd.
sys_exit
Exit current task
sys_fcntl
Manipulate file descriptor.
sys_freeaddrinfo
Free queried addrinfo struct
sys_fstat
Get file metadata by fd and write into buf.
sys_getaddrinfo
Query addresses for a domain name.
sys_getcwd
Get the path of the current directory.
sys_getpeername
Get peer address to which the socket sockfd is connected.
sys_getpid
Get current thread ID.
sys_getrlimit
Get resource limitations
sys_getsockname
Get current address to which the socket sockfd is bound.
sys_listen
Listen for connections on a socket
sys_lseek
Set the position of the file indicated by fd.
sys_lstat
Get the metadata of the symbolic link and write into buf.
sys_nanosleep
Sleep some nanoseconds
sys_open
Open a file by filename and insert it into the file descriptor table.
sys_pipe
Create a pipe
sys_pthread_create
Create a new thread with the given entry point and argument.
sys_pthread_exit
Exits the current thread. The value retval will be returned to the joiner.
sys_pthread_join
Waits for the given thread to exit, and stores the return value in retval.
sys_pthread_mutex_init
Initialize a mutex.
sys_pthread_mutex_lock
Lock the given mutex.
sys_pthread_mutex_unlock
Unlock the given mutex.
sys_pthread_self
Returns the pthread struct of current thread.
sys_read
Read data from the file indicated by fd.
sys_recv
Receive a message on a socket.
sys_recvfrom
Receive a message on a socket and get its source address.
sys_rename
Rename old to new If new exists, it is first removed.
sys_sched_yield
Relinquish the CPU, and switches to another task.
sys_select
Monitor multiple file descriptors, waiting until one or more of the file descriptors become “ready” for some class of I/O operation
sys_send
Send a message on a socket to the address connected.
sys_sendto
Send a message on a socket to the address specified.
sys_setrlimit
Set resource limitations
sys_shutdown
Shut down a full-duplex connection.
sys_socket
Create an socket for communication.
sys_stat
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.