xtos_ bci_ session_ destroy
Stops an active session, unmaps its buffer, closes its fd, and frees the session.
On this page
Declaration
#include <xtos/bci.h>
void xtos_bci_session_destroy(xtos_bci_session_t *session);Parameters
| Parameter | Type | Description |
|---|---|---|
| session | xtos_bci_session_t * | Session handle; NULL is a no-op. |
Return value
Returns no value; failures from stop, munmap, or close cannot be reported.
Errors
No errno error return. See Notes for input restrictions.
Notes
- Stop using the fd, mapping, and other session interfaces first; all borrowed resources expire after destroy.
- 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.
- Even if STOP fails or the device disconnects, destroy attempts both legacy and frame snapshot release, then closes the fd and frees both frame buffers and session. Cleanup errors cannot be returned; explicitly release before destroy when retryable cleanup is needed.
Example
Source
This reference describes headers and implementation in OpenXTOS v1.0.2 (c24e923717670c4724cdaf24c7c105caee8dc2fb).