Skip to main content

Crate xila_sys

Crate xila_sys 

Source
Expand description

Raw bindings for the startup-supplied native application ABI.

Structs§

Child
A spawned child, owned by the process that spawned it. It holds the child’s exit status until the owner waits for it, so a child that finished and was not waited for costs one signal slot and no task. xila_process_child_close releases it, waited for or not.
Condition
Process-local condition variable. Zero initialize or use condition_init. Keep its address fixed from first use through destruction. The fields are private to the host; copying a used condition or sharing it across processes is invalid.
Directory
Opaque path capability. Native callers must serialize access and preserve ownership.
DirectoryIterator
Opaque owned listing with at most one pending VFS entry for buffer retries.
File
Opaque owned file. No handle lookup or buffer allocation is required for I/O.
Heap
Opaque native heap capability. The process owner drops it after all native execution ends. Keep ownership outside any stack that can be abandoned.
Mutex
Process-local mutex. Zero initialize for a plain mutex, or use mutex_init. Keep its address fixed from first use through destruction. The fields are private to the host; copying a used mutex or sharing it across processes is invalid.
Network
Host-granted network authority. Future host/port restrictions belong here.
NetworkAddress
Fixed-width address. Bytes are in network order; integer fields are host order. IPv4 uses the first four bytes and requires the remaining bytes to be zero. Scope must be zero: Core does not support scoped IPv6 endpoints.
PollEntry
One poll entry. Only IN and OUT are requested. ERR, HUP and NVAL are reported regardless of the request. IGNORE entries always return zero. A null file/directory/socket or unknown kind reports NVAL.
Process
Opaque capability of the running process: its identity, environment, children and exit. The host grants it through XilaStartup.process; the pointer is borrowed for the entry call and a process must not pass it to another process.
Spawn
Arguments of xila_process_spawn. Set size to sizeof(XilaSpawn). All pointers are borrowed for the call.
Statistics
Versioned output: initialize size to sizeof(XilaStatistics) before each call.
Status
Native status values mirror the unified error kinds one-to-one. Zero is success.
Tcp
Owned TCP connection. Its creation grants bidirectional I/O authority.
TcpListener
One pending connection, with no additional backlog. Accept replenishes the socket.
ThreadLibc
SDK-reserved coroutine-local libc state. Other applications should use TLS keys.
Udp
Owned UDP socket. Sending additionally requires CONNECT on its parent capability.
XilaApi
Native application entry points, in slot order. The header precedes slot zero. Networking slots return Unsupported when the runtime omits networking, and so does the graphics slot when it omits graphics.
XilaStartup
Host-owned startup data, valid only for the duration of the entry call. The API is always present. Capability pointers may be null when not granted; the process capability is null for an application that is not a process, such as a built-in one linked into the firmware, whose process calls fail with InvalidArgument. A null argument array has argument_count zero. Fields are only ever appended: check size before reading a field that a later Xila version added, such as network. Applications must not close, retain or transfer these objects; closing them is undefined behavior. Objects opened by the application must still be closed.
XilaString
UTF-8 bytes, not NUL-terminated. A null data pointer is valid only at length zero.

Constants§

XILA_ADDRESS_IPV4
XILA_ADDRESS_IPV6
XILA_CLOCK_MONOTONIC
Monotonic clock identifier for xila_time_resolution.
XILA_CLOCK_REALTIME
Realtime (Unix UTC) clock identifier for xila_time_resolution.
XILA_CONTROL_BYTES_AVAILABLE
XILA_CONTROL_GET_FILE_FLAGS
XILA_CONTROL_SET_FILE_FLAGS
XILA_HEAP_ALIGNMENT
Alignment guaranteed for every allocation, including zero-length requests.
XILA_KIND_BLOCK_DEVICE
XILA_KIND_CHARACTER_DEVICE
XILA_KIND_DIRECTORY
XILA_KIND_FILE
XILA_KIND_PIPE
XILA_KIND_SOCKET
XILA_KIND_SYMLINK
XILA_MUTEX_RECURSIVE
XILA_MUTEX_TRY
XILA_NETWORK_CONNECT
XILA_NETWORK_LISTEN
XILA_NETWORK_RESOLVE
XILA_OPEN_APPEND
XILA_OPEN_CREATE
XILA_OPEN_EXCLUSIVE
XILA_OPEN_NON_BLOCKING
XILA_OPEN_READ
XILA_OPEN_TRUNCATE
XILA_OPEN_WRITE
XILA_PIPE_CAPACITY
XILA_POLL_DIRECTORY
XILA_POLL_ERR
XILA_POLL_FILE
XILA_POLL_HUP
XILA_POLL_IGNORE
XILA_POLL_IN
XILA_POLL_NVAL
XILA_POLL_OUT
XILA_POLL_TCP
XILA_POLL_TCP_LISTENER
XILA_POLL_UDP
XILA_REMOVE_DIRECTORY
Allow removing directories as well as files. Removal never follows the final link.
XILA_RIGHT_READ
XILA_RIGHT_WRITE
XILA_SEEK_CURRENT
XILA_SEEK_END
XILA_SEEK_START
XILA_SHUTDOWN_WRITE
XILA_SPAWN_NETWORK_CONNECT
XilaSpawn.flags: give the child the right to connect (and to send datagrams). The value is XILA_NETWORK_CONNECT’s.
XILA_SPAWN_NETWORK_LISTEN
XilaSpawn.flags: give the child the right to listen and bind. The value is XILA_NETWORK_LISTEN’s.
XILA_SPAWN_NETWORK_RESOLVE
XilaSpawn.flags: give the child the right to resolve names. The value is XILA_NETWORK_RESOLVE’s.
XILA_STATISTICS_NO_FOLLOW
XILA_THREAD_KEYS_MAX
XILA_THREAD_STACK_MAX
XILA_THREAD_STACK_MIN
XILA_VERSION_MAJOR
Major version of the Xila release this ABI belongs to. Native images record (XILA_VERSION_MAJOR << 16) | XILA_VERSION_MINOR in their ABI note.
XILA_VERSION_MINOR
Minor version of the Xila release this ABI belongs to.
XILA_WAIT_NO_HANG
xila_process_wait flag: return WouldBlock instead of waiting for a running child.

Type Aliases§

ThreadEntry
A native worker entry. Null is rejected.