xtos_ bci_ get_ mmap_ buffer
Pinned v1.0.2 refuses unsafe unversioned mmap; use versioned snapshots.
On this page
Declaration
#include <xtos/bci.h>
void *xtos_bci_get_mmap_buffer(xtos_bci_session_t *session, size_t *size);Parameters
| Parameter | Type | Description |
|---|---|---|
| session | xtos_bci_session_t * | A valid session returns EOPNOTSUPP; NULL returns EINVAL. |
| size | size_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
| errno | Condition |
|---|---|
| EOPNOTSUPP | Legacy mmap is refused even with a valid session. |
| EINVAL | session 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).