|
LibJuno 1.0.4
LibJuno is a lightweight C11 library designed specifically for embedded systems.
|

Functions | |
| JUNO_STATUS_T | JunoThread_Init (JUNO_THREAD_ROOT_T *ptRoot, const JUNO_THREAD_API_T *ptApi, JUNO_FAILURE_HANDLER_T pfcnFailureHandler, void *pvFailureUserData) |
| Initialize a Thread module root instance. | |
| JUNO_STATUS_T JunoThread_Init | ( | JUNO_THREAD_ROOT_T * | ptRoot, |
| const JUNO_THREAD_API_T * | ptApi, | ||
| JUNO_FAILURE_HANDLER_T | pfcnFailureHandler, | ||
| void * | pvFailureUserData | ||
| ) |
Initialize a Thread module root instance.
Initialise a Thread module root with a concrete vtable and failure handler.
Wires the vtable pointer into the root, clears the cooperative stop flag, and stores the optional failure handler and its associated user-data pointer. This function must be called before any vtable dispatch function (Stop, Join, Free).
The OS thread handle is not initialised here; it is stored in the platform-specific derivation and set by JunoThread_LinuxInit after a successful pthread_create call.
| ptRoot | Caller-owned root storage. Must not be NULL. |
| ptApi | Vtable (e.g., &g_junoThreadLinuxApi or a test double). Must not be NULL. |
| pfcnFailureHandler | Optional diagnostic callback; may be NULL. |
| pvFailureUserData | Opaque user data passed to pfcnFailureHandler; may be NULL. |
JUNO_STATUS_SUCCESS on success, JUNO_STATUS_NULLPTR_ERROR if ptRoot or ptApi is NULL.