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 File Reference

Implementation of the process-wide application setup-phase lock - see sapi_lifecycle.h. More...

Include dependency graph for sapi_lifecycle.c:

Go to the source code of this file.

Functions

void sapi_lifecycle_lock (void)
 Locks the application's setup phase.
void sapi_lifecycle_unlock (void)
 Unlocks the application's setup phase (setup is allowed again).
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 that creates/registers a new long-lived resource (a timer, channel, voter, cross-comparator, or watchdog - see this file's own header for the excluded netlink/dual exceptions).

Variables

static bool g_setup_locked = false
 Single, process-wide setup-phase flag (single instance; no dynamic allocation - same posture as sapi_appmanager.c's own g_app_state, see this module's own file header).

Detailed Description

Implementation of the process-wide application setup-phase lock - see sapi_lifecycle.h.

Definition in file sapi_lifecycle.c.

Variable Documentation

◆ g_setup_locked

bool g_setup_locked = false
static

Single, process-wide setup-phase flag (single instance; no dynamic allocation - same posture as sapi_appmanager.c's own g_app_state, see this module's own file header).

Local makros Local types declarations Local variables declarations

Definition at line 17 of file sapi_lifecycle.c.