API reference

Every public function, formatted from its manual page and grouped by layer.

---
  1. Categories
  2. Environment variables
  3. Error codes

This is the complete public xtc_* surface, rendered from the shipped manual pages and grouped by the layer each function belongs to. Every function here also installs as a system man page (man 3 xtc_loop) and its coverage is a release gate – a public symbol without a manual page fails the build.

Looking for the generated, cross-referenced C API (types, structs, call graphs)? That is the Doxygen reference, built from the headers. This section is the prose contract for each function.

Categories

Environment variables

libxtc reads a small set of environment variables, mainly for deterministic simulation and diagnostics:

Variable Effect
XTC_SIM_SEED Seed for the deterministic simulation scheduler (sim I/O backend). Same seed, same run.
XTC_IO_BACKEND Override the compiled-in I/O backend selection at runtime where more than one is available.
TMPDIR Standard: where temporary files (e.g. test scratch) are created.

Sanitizer and debugging knobs (ASAN_OPTIONS, UBSAN_OPTIONS, TSAN_OPTIONS) are the standard ones; the project’s CI runs with detect_leaks=1:abort_on_error=1 under ASan and print_stacktrace=1:halt_on_error=1 under UBSan (see Testing).

Error codes

Every fallible function returns XTC_OK (0) or a negative XTC_E_* code; xtc_strerror(3) maps a code to a string. The allocator contract is that XTC_OK implies a non-NULL pointer, so callers check the return code, never the pointer as well – see xtc_free(3).


Table of contents