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

Optional sequence-latched waiting without hidden workers. More...

#include "nexus/core/status.h"
#include "nexus/core/time.h"
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  nx_wait_port_t
 Single-waiter notification port. More...

Functions

nx_result_t nx_wait_until (const nx_wait_port_t *port, bool(*ready)(void *), void *context, uint64_t deadline_us)
 Wait for an authoritative caller predicate.

Detailed Description

Optional sequence-latched waiting without hidden workers.

Author
Nexus Team

Definition in file wait.h.

Function Documentation

◆ nx_wait_until()

nx_result_t nx_wait_until ( const nx_wait_port_t * port,
bool(* ready )(void *),
void * context,
uint64_t deadline_us )

Wait for an authoritative caller predicate.

Parameters
[in]portLive single-waiter notification port
[in]readyBounded predicate, called in caller context
[in]contextPredicate context, retained for this call only
[in]deadline_usAbsolute deadline in port's clock domain, or NX_DEADLINE_NEVER; no wall-clock or relative values
Returns
NX_SUCCESS when predicate is observed true, including a final observation after TIMEOUT; otherwise port error
Note
Task context. No service, queue, callback dispatch or task creation is implicit. A shared-bus client must not use ready to service the controller; its execution owner must remain running during stop/drain.