Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
sapi_lifecycle.c
Go to the documentation of this file.
1
8
10
12
17static bool g_setup_locked = false;
18
20
22
23
26{
27 g_setup_locked = true;
28}
29
31{
32 g_setup_locked = false;
33}
34
36{
37 return g_setup_locked;
38}
39
void sapi_lifecycle_lock(void)
Locks the application's setup phase.
bool sapi_lifecycle_is_locked(void)
sapi_status_t sapi_lifecycle_check_setup_allowed(void)
Convenience check for a setup-only constructor: call this as one of the first checks in any function ...
void sapi_lifecycle_unlock(void)
Unlocks the application's setup phase (setup is allowed again).
sapi_status_t
Common result/status codes.
Definition sapi_status.h:27
@ SAPI_STATUS_INVALID_STATE
Definition sapi_status.h:40
@ SAPI_STATUS_OK
Definition sapi_status.h:28
static bool g_setup_locked
Single, process-wide setup-phase flag (single instance; no dynamic allocation - same posture as sapi_...
Process-wide application setup-phase lock (ADR-026).