Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
Mutex Service - Backend Adaptation

Backend vtable and registration for the Mutex service (ADR-033). More...

Data Structures

struct  sapi_mutex_backend_t
 Backend vtable: an integrator's implementation of the mutex service for a specific OS/RTOS/BSP target (ADR-033). Any slot may be NULL if that operation is unsupported by the backend, in which case the corresponding sapi_mutex_* call returns SAPI_STATUS_NOT_SUPPORTED. More...

Functions

sapi_status_t sapi_mutex_register_backend (const sapi_mutex_backend_t *backend)
 Registers the backend implementation used by every sapi_mutex_* call. This is how an integrator supplies their own mutex implementation - call once at startup, before any other sapi_mutex_* function.

Detailed Description

Backend vtable and registration for the Mutex service (ADR-033).

Function Documentation

◆ sapi_mutex_register_backend()

sapi_status_t sapi_mutex_register_backend ( const sapi_mutex_backend_t * backend)

Registers the backend implementation used by every sapi_mutex_* call. This is how an integrator supplies their own mutex implementation - call once at startup, before any other sapi_mutex_* function.

Parameters
backendMust not be NULL. Registering again replaces the previously registered backend.
Returns
SAPI_STATUS_INVALID_PARAM if backend is NULL; SAPI_STATUS_OK otherwise.
SAPI_STATUS_INVALID_STATE if the application's setup phase is already locked (ADR-026).

REQ-OAL-MUTEX-015

Global variables declarations Local function declarations Global functions

Definition at line 25 of file sapi_mutex.c.