xtos_ bci_ frame_ snapshot_ release
Unmaps locally before releasing the token; succeeds with 0 when no snapshot of this family is held.
On this page
Declaration
#include <xtos/bci.h>
int xtos_bci_frame_snapshot_release(xtos_bci_session_t *session);Parameters
| Parameter | Type | Description |
|---|---|---|
| session | xtos_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
| errno | Condition |
|---|---|
| EINVAL | session is NULL. |
| munmap errno | Unmapping failed; mapping and token both remain owned for retry. |
| ioctl errno | The 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.
- Every ioctl failure retains the token for retry, including ENODEV/ENOENT/ESTALE. After unmapping, consume returns ENOENT and acquire/read remain EBUSY until release succeeds or destroy runs.
- 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
#include <xtos/bci.h>
int release_view(xtos_bci_session_t *s) {
return xtos_bci_frame_snapshot_release(s);
}Source
This reference describes headers and implementation in OpenXTOS v1.0.2 (c24e923717670c4724cdaf24c7c105caee8dc2fb).