Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Toggle main menu visibility
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
20
#include "
safeapi/utils/status/sapi_status.h
"
21
#include "
safeapi/oal/mutex/sapi_mutex.h
"
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
34
typedef
struct
sapi_mutex_backend_s
35
{
37
sapi_status_t
(*
create
)(sapi_mutex_storage_t *storage,
sapi_mutex_handle_t
*out_handle);
39
sapi_status_t
(*
lock
)(
sapi_mutex_handle_t
handle);
41
sapi_status_t
(*
unlock
)(
sapi_mutex_handle_t
handle);
43
sapi_status_t
(*
destroy
)(
sapi_mutex_handle_t
handle);
44
}
sapi_mutex_backend_t
;
45
59
sapi_status_t
sapi_mutex_register_backend
(
const
sapi_mutex_backend_t
*backend);
60
61
#ifdef __cplusplus
62
}
63
#endif
64
65
#endif
/* SAFEAPI_OS_MUTEX_BACKEND_H */
66
/* MUTEX_BACKEND */
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 suppl...
Definition
sapi_mutex.c:25
sapi_mutex_handle_t
struct sapi_mutex_impl_s * sapi_mutex_handle_t
Definition
sapi_mutex.h:44
sapi_status_t
sapi_status_t
Common result/status codes.
Definition
sapi_status.h:27
sapi_mutex.h
OS Abstraction Layer - Mutual exclusion service.
sapi_status.h
Common status/error codes returned by every Safe API Framework function. Shared across all OS Abstrac...
sapi_mutex_backend_t
Backend vtable: an integrator's implementation of the mutex service for a specific OS/RTOS/BSP target...
Definition
sapi_mutex_backend.h:35
sapi_mutex_backend_t::unlock
sapi_status_t(*) unlock(sapi_mutex_handle_t handle)
Backend implementation of sapi_mutex_unlock(). May be NULL.
Definition
sapi_mutex_backend.h:41
sapi_mutex_backend_t::destroy
sapi_status_t(*) destroy(sapi_mutex_handle_t handle)
Backend implementation of sapi_mutex_destroy(). May be NULL.
Definition
sapi_mutex_backend.h:43
sapi_mutex_backend_t::create
sapi_status_t(*) create(sapi_mutex_storage_t *storage, sapi_mutex_handle_t *out_handle)
Backend implementation of sapi_mutex_create(). May be NULL.
Definition
sapi_mutex_backend.h:37
sapi_mutex_backend_t::lock
sapi_status_t(*) lock(sapi_mutex_handle_t handle)
Backend implementation of sapi_mutex_lock(). May be NULL.
Definition
sapi_mutex_backend.h:39
include
safeapi_backend
mutex
sapi_mutex_backend.h
Generated by
1.18.0