Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
freertos_stack.h File Reference

Optional bounded task stack paint snapshot. More...

#include "FreeRTOS.h"
#include "nexus/core/stack_observation.h"
#include "task.h"

Go to the source code of this file.

Data Structures

struct  nx_freertos_stack_binding_t
 Exact static task facts supplied at original creation. More...

Functions

nx_result_t nx_freertos_stack_observe (const nx_freertos_stack_binding_t *binding, nx_stack_observation_t *out)
 Copy bounded stack paint facts using actual kernel identity.

Detailed Description

Optional bounded task stack paint snapshot.

Author
Nexus Team

Definition in file freertos_stack.h.

Function Documentation

◆ nx_freertos_stack_observe()

nx_result_t nx_freertos_stack_observe ( const nx_freertos_stack_binding_t * binding,
nx_stack_observation_t * out )

Copy bounded stack paint facts using actual kernel identity.

Parameters
[in]bindingExact original TCB, stack and capacity, all live.
[out]outDistinct output, unchanged on rejection.
Returns
SUCCESS, INVALID, CONTEXT or STATE for a binding mismatch.
Note
Privileged unmasked running Thread; task stack quiescent throughout the scan. Available only with NEXUS_OS_TRACE. xTaskGetStaticBuffers verifies TCB/stack identity, not size. The original capacity is a caller contract. No task suspend, interrupt mask, allocation or live painting is performed. Worst-case work is words*sizeof(StackType_t) byte reads. Paint is the locked kernel's 0xA5. Untouched/touched bytes do not prove physical stack peaks. The POSIX kernel port uses a separate pthread execution stack; its query is not an MCU or Linux execution-stack peak measurement.