Available on crate feature
cbindings
only.Expand description
Exported C bindings, to call ArceOS funtions from C code.
Functions
- ax_accept⚠
net
Accept for connections on a socket - ax_bind⚠
net
Bind a address to a socket. - Get clock time since booting
- ax_close⚠
alloc
Close a file byfd
. - ax_connect⚠
net
Connects the socket to the address specified. - ax_dup⚠
alloc
Duplicate a file descriptor - ax_dup3⚠
alloc
dup3()
is the same asdup2()
, except that: - Returns a pointer to the string representation of the given error code.
- Exits the current thread.
- ax_fcntl⚠
alloc
Fcntl implementation - ax_free⚠
alloc
Deallocate memory. - ax_fstat⚠
alloc
Get file metadata byfd
and write intobuf
. - ax_getcwd⚠
fs
Get the path of the current directory. - ax_getpeername⚠
net
Get peer address to which the socket sockfd is connected. - ax_getpid⚠
multitask
Get current thread ID - ax_getsockname⚠
net
Get current address to which the socket sockfd is bound. - ax_listen⚠
net
Listen for connections on a socket - ax_lseek⚠
fs
Set the position of the file indicated byfd
. - ax_lstat⚠
fs
Get the metadata of the symbolic link and write intobuf
. - ax_malloc⚠
alloc
Allocate memory and return the memory address. - Sleep some nanoseconds
- ax_open⚠
fs
Open a file byfilename
and insert it into the file descriptor table. - Abort the current process.
- ax_pipe⚠
pipe
Create a pipe - Print a string to the global standard output stream.
- Printf a string to the global standard output stream. Add a line break.
- Returns a 32-bit unsigned pseudo random interger.
- ax_read⚠
alloc
Read data from the file indicated byfd
. - ax_recv⚠
net
Receive a message on a socket. - ax_recvfrom⚠
net
Receive a message on a socket and get its source address. - Query addresses for a domain name.
- ax_select⚠
alloc
Monitor multiple file descriptors, waiting until one or more of the file descriptors become “ready” for some class of I/O operation - ax_send⚠
net
Send a message on a socket to the address connected. - ax_sendto⚠
net
Send a message on a socket to the address specified. - ax_shutdown⚠
net
Shut down a full-duplex connection. - ax_socket⚠
net
Create an socket for communication. - Sets the seed for the random number generator.
- ax_stat⚠
fs
Get the file metadata bypath
and write intobuf
. - Return system configuration infomation
- ax_write⚠
alloc
Write data to the file indicated byfd
.