Module libax::cbindings

source ·
Available on crate feature cbindings only.
Expand description

Exported C bindings, to call ArceOS funtions from C code.

Functions

  • ax_acceptnet
    Accept for connections on a socket
  • ax_bindnet
    Bind a address to a socket.
  • Get clock time since booting
  • ax_closealloc
    Close a file by fd.
  • Connects the socket to the address specified.
  • ax_dupalloc
    Duplicate a file descriptor
  • ax_dup3alloc
    dup3() is the same as dup2(), except that:
  • Returns a pointer to the string representation of the given error code.
  • Exits the current thread.
  • ax_fcntlalloc
    Fcntl implementation
  • ax_freealloc
    Deallocate memory.
  • ax_fstatalloc
    Get file metadata by fd and write into buf.
  • Get the path of the current directory.
  • Get peer address to which the socket sockfd is connected.
  • ax_getpidmultitask
    Get current thread ID
  • Get current address to which the socket sockfd is bound.
  • ax_listennet
    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.
  • ax_mallocalloc
    Allocate memory and return the memory address.
  • Sleep some nanoseconds
  • ax_openfs
    Open a file by filename and insert it into the file descriptor table.
  • Abort the current process.
  • ax_pipepipe
    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_readalloc
    Read data from the file indicated by fd.
  • ax_recvnet
    Receive a message on a socket.
  • Receive a message on a socket and get its source address.
  • Query addresses for a domain name.
  • ax_selectalloc
    Monitor multiple file descriptors, waiting until one or more of the file descriptors become “ready” for some class of I/O operation
  • ax_sendnet
    Send a message on a socket to the address connected.
  • ax_sendtonet
    Send a message on a socket to the address specified.
  • Shut down a full-duplex connection.
  • ax_socketnet
    Create an socket for communication.
  • Sets the seed for the random number generator.
  • ax_statfs
    Get the file metadata by path and write into buf.
  • Return system configuration infomation
  • ax_writealloc
    Write data to the file indicated by fd.