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

Privileged static lifecycle for isolated MPU user tasks. More...

#include "FreeRTOS.h"
#include "nexus/core/status.h"
#include "nexus/os/freertos_user.h"
#include "task.h"

Go to the source code of this file.

Data Structures

struct  nx_freertos_mpu_region_t
 A caller-selected exact region, copied during task creation. More...
struct  nx_freertos_mpu_task_t
 Complete caller-owned protected task metadata. More...
struct  nx_freertos_mpu_config_t
 Immutable creation inputs, borrowed for this call only. More...

Enumerations

enum  nx_freertos_mpu_access_t { NX_FREERTOS_MPU_READ_ONLY = 0 , NX_FREERTOS_MPU_READ_WRITE = 1 }
 User data is nonexecuting normal RAM with only these permissions. More...

Functions

nx_result_t nx_freertos_mpu_task_start (nx_freertos_mpu_task_t *task, const nx_freertos_mpu_config_t *config)
 Create an unprivileged task from exact caller-owned storage.
nx_result_t nx_freertos_mpu_task_delete (nx_freertos_mpu_task_t *task)
 Delete another isolated task after external users quiesce.

Detailed Description

Privileged static lifecycle for isolated MPU user tasks.

Author
Nexus Team

Definition in file freertos_mpu.h.

Enumeration Type Documentation

◆ nx_freertos_mpu_access_t

User data is nonexecuting normal RAM with only these permissions.

Enumerator
NX_FREERTOS_MPU_READ_ONLY 
NX_FREERTOS_MPU_READ_WRITE 

Definition at line 23 of file freertos_mpu.h.

Function Documentation

◆ nx_freertos_mpu_task_delete()

nx_result_t nx_freertos_mpu_task_delete ( nx_freertos_mpu_task_t * task)

Delete another isolated task after external users quiesce.

Parameters
[in,out]taskOwned live protected metadata; never the calling task.
Returns
Success, INVALID, CONTEXT or STATE with storage retained.
Note
One privileged lifecycle owner stops external access first. Single-core kernel deletion removes scheduler references synchronously. Self deletion is rejected; no hidden reaper.

◆ nx_freertos_mpu_task_start()

nx_result_t nx_freertos_mpu_task_start ( nx_freertos_mpu_task_t * task,
const nx_freertos_mpu_config_t * config )

Create an unprivileged task from exact caller-owned storage.

Parameters
[in,out]taskZero/live-free metadata in protected linker RAM.
[in]configValidated user entry, stack and data mappings.
Returns
Success or INVALID/CONTEXT/STATE/BUSY/IO before admission.
Note
Privileged Thread only, scheduler not suspended, no manual masks. Rejection retains no references and calls no kernel creation API. Actual linker bounds and MPU_TYPE are checked. Minimum creation capacity is 64 words; applications budget actual execution depth separately. No heap or object pool.