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_closereleases 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.
- Directory
Iterator - 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.
- Network
Address - 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.
- Poll
Entry - 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. Setsizetosizeof(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.
- Thread
Libc - 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.
- Xila
Startup - 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
sizebefore reading a field that a later Xila version added, such asnetwork. Applications must not close, retain or transfer these objects; closing them is undefined behavior. Objects opened by the application must still be closed. - Xila
String - 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 isXILA_NETWORK_CONNECT’s.- XILA_
SPAWN_ NETWORK_ LISTEN XilaSpawn.flags: give the child the right to listen and bind. The value isXILA_NETWORK_LISTEN’s.- XILA_
SPAWN_ NETWORK_ RESOLVE XilaSpawn.flags: give the child the right to resolve names. The value isXILA_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_MINORin their ABI note. - XILA_
VERSION_ MINOR - Minor version of the Xila release this ABI belongs to.
- XILA_
WAIT_ NO_ HANG xila_process_waitflag: returnWouldBlockinstead of waiting for a running child.
Type Aliases§
- Thread
Entry - A native worker entry. Null is rejected.