|
Nexus Embedded Platform 0.1.0
Statically assembled reusable embedded mechanisms
|
Explicit bounded multi-producer, single-executor adapter. More...
Go to the source code of this file.
Data Structures | |
| struct | nx_owner_guard_port_t |
| Explicit bounded metadata exclusion port. More... | |
| struct | nx_owner_executor_port_t |
| One real execution owner, injected without OS dependency. More... | |
| struct | nx_owner_ticket_t |
| Stable control identity; never dereference a stale request pointer. More... | |
| struct | nx_owner_slot_t |
| Exact caller-owned slot, linked in either the free or FIFO chain; initialize only with owner init. More... | |
| struct | nx_bus_owner_t |
| Explicit adapter state; external application supplies all storage. More... | |
Functions | |
| nx_result_t | nx_bus_owner_init (nx_bus_owner_t *owner, nx_owner_slot_t *slots, size_t capacity, nx_owner_guard_port_t guard, nx_owner_executor_port_t executor, nx_clock_t clock, const nx_wait_port_t *wake) |
| Initialize unused owner/slot storage. | |
| nx_result_t | nx_bus_owner_submit (nx_bus_owner_t *owner, nx_request_t *request, void *operation, const nx_wait_port_t *completion, nx_owner_ticket_t *ticket) |
| Establish the chain's unique admission. | |
| nx_result_t | nx_bus_owner_cancel (nx_bus_owner_t *owner, nx_owner_ticket_t ticket) |
| Submit cancellation through stable adapter storage. | |
| nx_result_t | nx_bus_owner_service (nx_bus_owner_t *owner) |
| Advance at most one bounded execution step. | |
| void | nx_bus_owner_stop (nx_bus_owner_t *owner) |
| Close admission and request every accepted operation to stop. | |
| bool | nx_bus_owner_idle (nx_bus_owner_t *owner) |
| Test whether execution and completion publication have exited. | |
Explicit bounded multi-producer, single-executor adapter.
Definition in file bus_owner.h.
| nx_result_t nx_bus_owner_cancel | ( | nx_bus_owner_t * | owner, |
| nx_owner_ticket_t | ticket ) |
Submit cancellation through stable adapter storage.
| [in,out] | owner | Live adapter |
| [in] | ticket | Previously accepted slot/epoch |
| bool nx_bus_owner_idle | ( | nx_bus_owner_t * | owner | ) |
Test whether execution and completion publication have exited.
| [in,out] | owner | Live adapter |
| nx_result_t nx_bus_owner_init | ( | nx_bus_owner_t * | owner, |
| nx_owner_slot_t * | slots, | ||
| size_t | capacity, | ||
| nx_owner_guard_port_t | guard, | ||
| nx_owner_executor_port_t | executor, | ||
| nx_clock_t | clock, | ||
| const nx_wait_port_t * | wake ) |
Initialize unused owner/slot storage.
| [out] | owner | Unused caller-owned adapter storage |
| [in] | slots | Exact queue capacity, no maximum pool |
| [in] | capacity | Number of slots, greater than zero |
| [in] | guard | Live short exclusion port |
| [in] | executor | Single real execution port |
| [in] | clock | Same monotonic domain as request deadlines |
| [in] | wake | Optional static executor notification, or NULL |
| nx_result_t nx_bus_owner_service | ( | nx_bus_owner_t * | owner | ) |
Advance at most one bounded execution step.
| [in,out] | owner | Live adapter, called by its unique executor |
| void nx_bus_owner_stop | ( | nx_bus_owner_t * | owner | ) |
Close admission and request every accepted operation to stop.
| [in,out] | owner | Live adapter |
| nx_result_t nx_bus_owner_submit | ( | nx_bus_owner_t * | owner, |
| nx_request_t * | request, | ||
| void * | operation, | ||
| const nx_wait_port_t * | completion, | ||
| nx_owner_ticket_t * | ticket ) |
Establish the chain's unique admission.
| [in,out] | owner | Live accepting adapter |
| [in,out] | request | Prepared READY storage, retained until SETTLED |
| [in] | operation | Executor-specific descriptor and payload storage |
| [in] | completion | Optional static caller wake port, or NULL |
| [out] | ticket | Stable cancellation identity, valid on SUCCESS |