Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
sapi_mutex_backend.h
Go to the documentation of this file.
1
17#ifndef SAFEAPI_OS_MUTEX_BACKEND_H
18#define SAFEAPI_OS_MUTEX_BACKEND_H
19
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
34typedef struct sapi_mutex_backend_s
35{
37 sapi_status_t (*create)(sapi_mutex_storage_t *storage, sapi_mutex_handle_t *out_handle);
45
60
61#ifdef __cplusplus
62}
63#endif
64
65#endif /* SAFEAPI_OS_MUTEX_BACKEND_H */
66 /* MUTEX_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 suppl...
Definition sapi_mutex.c:25
struct sapi_mutex_impl_s * sapi_mutex_handle_t
Definition sapi_mutex.h:44
sapi_status_t
Common result/status codes.
Definition sapi_status.h:27
OS Abstraction Layer - Mutual exclusion service.
Common status/error codes returned by every Safe API Framework function. Shared across all OS Abstrac...
Backend vtable: an integrator's implementation of the mutex service for a specific OS/RTOS/BSP target...
sapi_status_t(*) unlock(sapi_mutex_handle_t handle)
Backend implementation of sapi_mutex_unlock(). May be NULL.
sapi_status_t(*) destroy(sapi_mutex_handle_t handle)
Backend implementation of sapi_mutex_destroy(). May be NULL.
sapi_status_t(*) create(sapi_mutex_storage_t *storage, sapi_mutex_handle_t *out_handle)
Backend implementation of sapi_mutex_create(). May be NULL.
sapi_status_t(*) lock(sapi_mutex_handle_t handle)
Backend implementation of sapi_mutex_lock(). May be NULL.