Crate arceos_posix_api

source ·
Expand description

POSIX-compatible APIs for ArceOS modules

Modules

  • Platform-specific constants and parameters.
  • POSIX C types.

Statics

  • Save environment variables
  • environalloc
    A pointer pointing to RX_ENVIRON

Functions

  • Generate an iterator for environment variables
  • Accept for connections on a socket
  • Bind a address to a socket.
  • Get clock time since booting
  • Get clock time since booting
  • sys_clonemultitask and musl
    Create new thread by sys_clone, return new thread ID
  • Close a file by fd.
  • Connects the socket to the address specified.
  • Duplicate a file descriptor.
  • Duplicate a file descriptor, but it uses the file descriptor number specified in new_fd.
  • sys_dup3fd and musl
    dup3 used by A64 for MUSL
  • sys_epoll_createepoll and (select or poll or epoll)
    Creates a new epoll instance.
  • sys_epoll_ctlepoll and (select or poll or epoll)
    Control interface for an epoll file descriptor
  • sys_epoll_pwaitepoll and (select or poll or epoll)
    epoll_pwait used by A64. Currently ignore signals
  • sys_epoll_waitepoll and (select or poll or epoll)
    Waits for events on the epoll instance referred to by the file descriptor epfd.
  • Exit current task
  • Manipulate file descriptor.
  • Free queried addrinfo struct
  • retrieve information about the file pointed by fd
  • fsync
  • sys_futexmultitask
    Futex implementation inspired by Starry
  • Query addresses for a domain name.
  • Get the path of the current directory.
  • Obtain a valid group ID for the process
  • Obtain a valid user ID for the process
  • sys_getitimersignal
    Get timer to send signal after some time
  • Get peer address to which the socket sockfd is connected.
  • Get current thread ID.
  • Get resource limitations
  • Get current address to which the socket sockfd is bound.
  • Invalid syscall
  • ioctl implementation, currently only support fd = 1
  • Listen for connections on a socket
  • Set the position of the file indicated by fd.
  • Get the metadata of the symbolic link and write into buf.
  • Creates a new, empty directory at the provided path.
  • attempts to create a directory named pathname under directory pointed by fd
  • Creates a new mapping in the virtual address space of the call‐ ing process.
  • Changes the access protections for the calling process’s memory pages containing any part of the address range in the interval [addr, addr+len-1].
    addr must be aligned to a page boundary.
  • Deletes the mappings for the specified address range
  • Sleep some nanoseconds
  • newfstatat used by A64
  • Open a file by filename and insert it into the file descriptor table.
  • Open a file under a specific dir
  • Create a pipe
  • pipe2 syscall, used by AARCH64
  • sys_pollpoll and (select or poll or epoll)
    Used to monitor multiple file descriptors for events
  • sys_ppollpoll and (select or poll or epoll)
    ppoll used by A64. Currently ignore signal
  • set/get resource limitations
  • sys_pselect6select and (select or poll or epoll)
    allows a program to monitor multiple file descriptors, waiting until one or more of the file descriptors become “ready” for some class of I/O operation (e.g., input possible)
  • Restarts all the threads that are waiting on the condition variable.
  • Destroy a condition variable
  • Initialize a condition variable
  • Restarts one of the threads that are waiting on the condition variable.
  • Wait for the condition variable to be signaled or timeout
  • Wait for the condition variable to be signaled
  • sys_pthread_createmultitask
    Create a new thread with the given entry point and argument.
  • Exits the current thread. The value retval will be returned to the joiner.
  • sys_pthread_getspecificmusl and multitask
    Get the value of a specific key for a thread.
  • sys_pthread_joinmultitask
    Waits for the given thread to exit, and stores the return value in retval.
  • sys_pthread_key_createmusl and multitask
    Allocate a specific key for a process shared by all threads.
  • sys_pthread_key_deletemusl and multitask
    Destroy a specific key for a process.
  • Destroy the given mutex.
  • Initialize a mutex.
  • Lock the given mutex.
  • Lock the given mutex like sys_pthread_mutex_lock, except that it does not block the calling thread if the mutex is already locked.
  • Unlock the given mutex.
  • Returns the pthread struct of current thread.
  • sys_pthread_setspecificmusl and multitask
    Set the value of a specific key for a thread.
  • Read data from the file indicated by fd.
  • Receive a message on a socket.
  • Receive a message on a socket and get its source address.
  • Rename old to new If new exists, it is first removed.
  • Remove a directory, which must be empty
  • sigaction syscall for A64 musl
  • Set mask for given thread
  • Relinquish the CPU, and switches to another task.
  • sys_selectselect and (select or poll or epoll)
    Monitor multiple file descriptors, waiting until one or more of the file descriptors become “ready” for some class of I/O operation
  • Send a message on a socket to the address connected.
  • Send a message on a socket to the address connected. The message is pointed to by the elements of the array msg.msg_iov.
  • Send a message on a socket to the address specified.
  • sys_set_tid_addressmultitask and musl
    Set child tid address
  • sys_setitimersignal
    Set a timer to send a signal to the current process after a specified time
  • Set resource limitations
  • setsockopt, currently ignored
  • Shut down a full-duplex connection.
  • Set signal handler
  • Create an socket for communication.
  • Get the file metadata by path and write into buf.
  • Return sysinfo struct
  • umask
  • Removes a file from the filesystem.
  • deletes a name from the filesystem
  • Write data to the file indicated by fd.
  • Write a vector.