|
Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
Mutex service: validates parameters, then dispatches to the backend registered via sapi_mutex_register_backend() (ADR-033). More...
#include "safeapi/utils/lifecycle/sapi_lifecycle.h"#include "safeapi/oal/mutex/sapi_mutex.h"#include "safeapi_backend/mutex/sapi_mutex_backend.h"Go to the source code of this file.
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. | |
| sapi_status_t | sapi_mutex_create (sapi_mutex_storage_t *storage, sapi_mutex_handle_t *out_handle) |
| Creates (and initializes, unlocked) a mutex bound to caller-owned storage. | |
| sapi_status_t | sapi_mutex_lock (sapi_mutex_handle_t handle) |
| Blocks the calling task until it holds the mutex. | |
| sapi_status_t | sapi_mutex_unlock (sapi_mutex_handle_t handle) |
| Releases a mutex previously locked by the calling task. | |
| sapi_status_t | sapi_mutex_destroy (sapi_mutex_handle_t handle) |
| Destroys a mutex, releasing any backend resources bound to it. Must not be called while any task holds or is waiting on the lock. | |
Variables | |
| static const sapi_mutex_backend_t * | s_backend = NULL |
| Currently registered backend, or NULL if none (ADR-033). | |
Mutex service: validates parameters, then dispatches to the backend registered via sapi_mutex_register_backend() (ADR-033).
Definition in file sapi_mutex.c.
|
static |
Currently registered backend, or NULL if none (ADR-033).
Local makros Local types declarations Local variables declarations
Definition at line 17 of file sapi_mutex.c.