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

Explicit borrowed IRQ wake target and syscall-ceiling check. More...

Go to the source code of this file.

Data Structures

struct  nx_irq_wake_t
 Optional immutable wake target borrowed by an IRQ provider. More...
struct  nx_irq_policy_t
 Immutable CPU and kernel facts for cold wake binding. More...
struct  nx_irq_source_t
 Actual publisher facts read before attaching any borrowed sink. More...

Enumerations

enum  nx_irq_kernel_policy_t { NX_IRQ_KERNEL_NONE = 0 , NX_IRQ_KERNEL_PRIMASK = 1 , NX_IRQ_KERNEL_BASEPRI = 2 }
 Explicit kernel interrupt-mask policy, independent of any RTOS. More...

Functions

nx_result_t nx_irq_wake_validate (const nx_irq_wake_t *wake, const nx_irq_policy_t *policy, const nx_irq_source_t *source)
 Validate actual IRQ facts against an explicit kernel policy.
nx_result_t nx_irq_wake_signal (const nx_irq_wake_t *wake)
 Deliver one bounded hint after authoritative state is latched.

Detailed Description

Explicit borrowed IRQ wake target and syscall-ceiling check.

Author
Nexus Team

Definition in file wake.h.

Enumeration Type Documentation

◆ nx_irq_kernel_policy_t

Explicit kernel interrupt-mask policy, independent of any RTOS.

Enumerator
NX_IRQ_KERNEL_NONE 
NX_IRQ_KERNEL_PRIMASK 
NX_IRQ_KERNEL_BASEPRI 

Definition at line 33 of file wake.h.

Function Documentation

◆ nx_irq_wake_signal()

nx_result_t nx_irq_wake_signal ( const nx_irq_wake_t * wake)

Deliver one bounded hint after authoritative state is latched.

Parameters
[in]wakePreviously validated live target or NULL.
Returns
Callback result, success for NULL, INVALID for a bad target.
Note
Task/IRQ as allowed by the target, no hidden task or retry. A failed wake does not revoke state or request ownership.

◆ nx_irq_wake_validate()

nx_result_t nx_irq_wake_validate ( const nx_irq_wake_t * wake,
const nx_irq_policy_t * policy,
const nx_irq_source_t * source )

Validate actual IRQ facts against an explicit kernel policy.

Parameters
[in]wakeOptional immutable target; NULL disables notification.
[in]policyImmutable validated CPU and kernel configuration.
[in]sourceExternal IRQ number, unshifted priority and group.
Returns
Success, INVALID for malformed facts/target, PERMISSION for a kernel-calling target in an unsafe interrupt domain.
Note
Cold check without attachment or callback effects. No kernel target is accepted by NONE. PRIMASK permits every valid configurable IRQ with its fixed zero priority group. Kernel-calling BASEPRI targets require the maintained preemption grouping and a numerical priority at least the ceiling. Nonkernel hints do not impose kernel grouping. Binding does not authorize future CPU-context violations.