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

xtos_bci_get_mmap_buffer

Pinned v1.0.2 refuses unsafe unversioned mmap; use versioned snapshots.

On this page

Declaration

c
#include <xtos/bci.h>

void *xtos_bci_get_mmap_buffer(xtos_bci_session_t *session, size_t *size);

Parameters

ParameterTypeDescription
sessionxtos_bci_session_t *A valid session returns EOPNOTSUPP; NULL returns EINVAL.
sizesize_t *Optional; if non-NULL, always written as zero bytes before checking the session.

Return value

Always returns NULL: errno=EOPNOTSUPP for a valid session, EINVAL for a NULL session; non-NULL size always receives zero.

Errors

errnoCondition
EOPNOTSUPPLegacy mmap is refused even with a valid session.
EINVALsession is NULL; size is still zeroed first.

Notes

  • size=0; valid sessions get EOPNOTSUPP. It neither estimates capacity nor calls mmap nor creates or lends a mapping.
  • Use xtos_bci_snapshot_acquire or xtos_bci_frame_snapshot_acquire with explicit consume/release; do not map the borrowed fd yourself.
  • 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.

Example

Source

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