XTOS / OPEN SOURCE REAL-TIME SYSTEMOPEN SOURCE · 1.0.2 · PRERELEASE · IMAGES & SOURCE
libxtos-bcixtos_bci_snapshot_release

xtos_bci_snapshot_release

Unmaps locally before releasing the token; succeeds with 0 when no snapshot of this family is held.

On this page

Declaration

c
#include <xtos/bci.h>

int xtos_bci_snapshot_release(xtos_bci_session_t *session);

Parameters

ParameterTypeDescription
sessionxtos_bci_session_t *Non-NULL, caller-managed lifetime; externally serialize access.

Return value

Returns 0 on success or -1 with the original errno on failure. Retry according to remaining ownership; release does not consume the ring.

Errors

errnoCondition
EINVALsession is NULL.
munmap errnoUnmapping failed; mapping and token both remain owned for retry.
ioctl errnoThe local mapping is already unmapped; token cleanup follows this family’s rules.

Notes

  • Externally serialize every API on one session; the SDK has no internal lock. Calls may block or allocate and establish no real-time deadline guarantee.
  • After ioctl failure the mapping is already invalid. Errors retain the token for retry, including ESTALE, except ENODEV/ENOENT terminate local ownership. Even terminal ownership cleanup returns -1 with errno preserved.
  • Release may be attempted after disconnect. Successful unmapping immediately invalidates all output pointers; the SDK does not zero old caller descriptors. If munmap fails, no release ioctl has been issued.
  • Destroy attempts both families’ cleanup even if STOP fails, but has no return value and cannot report or retry its failures. Explicitly release and handle errors first when cleanup status must be observed.

Example

c
#include <xtos/bci.h>
int release_view(xtos_bci_session_t *s) {
    return xtos_bci_snapshot_release(s);
}

Source

This reference describes headers and implementation in OpenXTOS v1.0.2 (c24e923717670c4724cdaf24c7c105caee8dc2fb).