|
Nexus Embedded Platform 0.1.0
Statically assembled reusable embedded mechanisms
|
Bounded diagnostics with explicit caller-owned ring storage. More...
Go to the source code of this file.
Data Structures | |
| struct | nx_diagnostic_event_t |
| One opaque diagnostic record; interpretation belongs to its owner. More... | |
| struct | nx_diagnostic_ring_t |
| Explicit ring state, with no default pool, worker or transport. More... | |
Functions | |
| nx_result_t | nx_diagnostic_ring_init (nx_diagnostic_ring_t *ring, nx_diagnostic_event_t *events, size_t capacity) |
| Initialize unpublished ring and caller-owned entries. | |
| nx_result_t | nx_diagnostic_ring_write (nx_diagnostic_ring_t *ring, const nx_diagnostic_event_t *event) |
| Copy one event under a bounded saved interrupt mask. | |
| nx_result_t | nx_diagnostic_ring_read (nx_diagnostic_ring_t *ring, nx_diagnostic_event_t *event) |
| Consume one event from caller-owned ring. | |
| nx_result_t | nx_diagnostic_ring_dropped (const nx_diagnostic_ring_t *ring, uint32_t *dropped) |
| Snapshot the saturating overflow count. | |
Bounded diagnostics with explicit caller-owned ring storage.
Definition in file diagnostic.h.
| nx_result_t nx_diagnostic_ring_dropped | ( | const nx_diagnostic_ring_t * | ring, |
| uint32_t * | dropped ) |
Snapshot the saturating overflow count.
| [in] | ring | Initialized ring. |
| [out] | dropped | Caller-owned result. |
| nx_result_t nx_diagnostic_ring_init | ( | nx_diagnostic_ring_t * | ring, |
| nx_diagnostic_event_t * | events, | ||
| size_t | capacity ) |
Initialize unpublished ring and caller-owned entries.
| [out] | ring | Unused caller-owned state. |
| [in] | events | Naturally aligned contiguous entry storage. |
| [in] | capacity | Nonzero storage length, at most UINT32_MAX. |
| nx_result_t nx_diagnostic_ring_read | ( | nx_diagnostic_ring_t * | ring, |
| nx_diagnostic_event_t * | event ) |
Consume one event from caller-owned ring.
| [in,out] | ring | Initialized ring with live producers. |
| [out] | event | Separate caller-owned destination. |
| nx_result_t nx_diagnostic_ring_write | ( | nx_diagnostic_ring_t * | ring, |
| const nx_diagnostic_event_t * | event ) |
Copy one event under a bounded saved interrupt mask.
| [in,out] | ring | Initialized ring. |
| [in] | event | Stable record until this call returns. |