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

Bare-metal poll notification with caller-owned storage. More...

#include "nexus/os/wait.h"

Go to the source code of this file.

Data Structures

struct  nx_baremetal_notify_t
 Explicit nonblocking bare-metal notification storage. More...

Functions

nx_result_t nx_baremetal_notify_init (nx_baremetal_notify_t *notification, uint64_t(*now_us)(void *), void *clock_context)
 Initialize storage before exposing it to any ISR.
nx_wait_port_t nx_baremetal_notify_port (nx_baremetal_notify_t *notification)
 Bind the explicit polling notification.

Detailed Description

Bare-metal poll notification with caller-owned storage.

Author
Nexus Team

Definition in file baremetal.h.

Function Documentation

◆ nx_baremetal_notify_init()

nx_result_t nx_baremetal_notify_init ( nx_baremetal_notify_t * notification,
uint64_t(* now_us )(void *),
void * clock_context )

Initialize storage before exposing it to any ISR.

Parameters
[out]notificationUnused caller-owned storage
[in]now_usMonotonic microsecond source, continuing while waiting
[in]clock_contextClock source context
Returns
NX_SUCCESS or NX_ERROR_INVALID
Note
Startup context; not a task/queue emulation. Word publication uses the reviewed inline compiler/CPU port.

◆ nx_baremetal_notify_port()

nx_wait_port_t nx_baremetal_notify_port ( nx_baremetal_notify_t * notification)

Bind the explicit polling notification.

Parameters
[in]notificationInitialized storage
Returns
Port whose wait returns BUSY while unchanged before deadline; NX_DEADLINE_NEVER disables expiry, never implies blocking
Note
wake uses compiler RMW or, on M0/M0+, a bounded saved PRIMASK guard. That guard requires one CPU and privileged Thread/configurable-IRQ callers; NMI/HardFault, unprivileged, DMA and other security-domain access to its metadata are unsupported. The owner loop continues to service controller/drain after BUSY. No WFI/WFE is inserted without a reviewed architecture-specific atomic sleep contract.