Crate arceos_posix_api
source ·Expand description
POSIX-compatible APIs for ArceOS modules
Modules§
- Platform-specific constants and parameters.
- POSIX C types.
Functions§
- sys_accept⚠
netAccept for connections on a socket - sys_bind
netBind a address to a socket. - Get clock time since booting
- Close a file by
fd. - sys_connect
netConnects the socket to the address specified. - sys_dup
fdDuplicate a file descriptor. - sys_dup2
fdDuplicate a file descriptor, but it uses the file descriptor number specified innew_fd. - sys_epoll_create
epolland (selectorepoll)Creates a new epoll instance. - sys_epoll_ctl⚠
epolland (selectorepoll)Control interface for an epoll file descriptor - sys_epoll_wait⚠
epolland (selectorepoll)Waits for events on the epoll instance referred to by the file descriptor epfd. - Exit current task
- Manipulate file descriptor.
- sys_freeaddrinfo⚠
netFree queriedaddrinfostruct - sys_fstat⚠
fsGet file metadata byfdand write intobuf. - sys_getaddrinfo⚠
netQuery addresses for a domain name. - Get the path of the current directory.
- sys_getpeername⚠
netGet peer address to which the socket sockfd is connected. - Get current thread ID.
- Get resource limitations
- sys_getsockname⚠
netGet current address to which the socket sockfd is bound. - sys_listen
netListen for connections on a socket - Set the position of the file indicated by
fd. - sys_lstat⚠
fsGet the metadata of the symbolic link and write intobuf. - Sleep some nanoseconds
- sys_open
fsOpen a file byfilenameand insert it into the file descriptor table. - sys_pipe
pipeCreate a pipe - sys_pthread_create⚠
multitaskCreate a new thread with the given entry point and argument. - sys_pthread_exit
multitaskExits the current thread. The valueretvalwill be returned to the joiner. - sys_pthread_join⚠
multitaskWaits for the given thread to exit, and stores the return value inretval. - sys_pthread_mutex_init
multitaskInitialize a mutex. - sys_pthread_mutex_lock
multitaskLock the given mutex. - sys_pthread_mutex_unlock
multitaskUnlock the given mutex. - sys_pthread_self
multitaskReturns thepthreadstruct of current thread. - Read data from the file indicated by
fd. - sys_recv
netReceive a message on a socket. - sys_recvfrom⚠
netReceive a message on a socket and get its source address. - Rename
oldtonewIf new exists, it is first removed. - Relinquish the CPU, and switches to another task.
- sys_select⚠
selectand (selectorepoll)Monitor multiple file descriptors, waiting until one or more of the file descriptors become “ready” for some class of I/O operation - sys_send
netSend a message on a socket to the address connected. - sys_sendto
netSend a message on a socket to the address specified. - Set resource limitations
- sys_shutdown
netShut down a full-duplex connection. - sys_socket
netCreate an socket for communication. - sys_stat⚠
fsGet the file metadata bypathand write intobuf. - Return system configuration infomation
- Write data to the file indicated by
fd. - Write a vector.