|
ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) 0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
|
Generic event ring buffer implementation. More...
Go to the source code of this file.
Functions | |
| void | __event_init (void) |
| void | __os_event (uint8_t module_id, event_severity_t severity, uint16_t event_id, const void *payload, uint8_t payload_len) |
| void | __event_set_squelch (uint8_t module_id, event_severity_t min_severity) |
| event_severity_t | __event_get_squelch (uint8_t module_id) |
| bool | __event_drain (event_entry_t *out_buf, uint8_t max_entries, uint8_t *num_drained) |
| uint32_t | __event_get_count (void) |
Variables | |
| static event_entry_t | ring [32] |
| static uint32_t | ring_head |
| static uint32_t | ring_count |
| static event_severity_t | squelch [16] |
Generic event ring buffer implementation.
Lock-protected (enter_critical / exit_critical) circular ring of fixed-size event entries with per-module severity squelch. Transport-agnostic: drains into a caller-provided buffer.
The ring, head/count cursors, and squelch table all live in DTCM_DATA_PRIV (privileged-only TCM). Public access goes through SVC gates so unprivileged thread-mode tasks can use the API once the MPU is locked.
Definition in file event.c.
| bool __event_drain | ( | event_entry_t * | out_buf, |
| uint8_t | max_entries, | ||
| uint8_t * | num_drained | ||
| ) |
Definition at line 88 of file event.c.
References EVENT_RING_SIZE, ring, ring_count, and ring_head.
Referenced by event_drain(), and SVC_Handler_C().
| uint32_t __event_get_count | ( | void | ) |
Definition at line 133 of file event.c.
References ring_count.
Referenced by event_get_count(), and SVC_Handler_C().
| event_severity_t __event_get_squelch | ( | uint8_t | module_id | ) |
Definition at line 81 of file event.c.
References EVENT_DEBUG, EVENT_MOD_MAX, and squelch.
Referenced by event_get_squelch(), and SVC_Handler_C().
| void __event_init | ( | void | ) |
Definition at line 34 of file event.c.
References EVENT_DEBUG, EVENT_MOD_MAX, ring, ring_count, ring_head, and squelch.
Referenced by event_init(), and SVC_Handler_C().
| void __event_set_squelch | ( | uint8_t | module_id, |
| event_severity_t | min_severity | ||
| ) |
Definition at line 73 of file event.c.
References EVENT_MOD_MAX, and squelch.
Referenced by event_set_squelch(), and SVC_Handler_C().
| void __os_event | ( | uint8_t | module_id, |
| event_severity_t | severity, | ||
| uint16_t | event_id, | ||
| const void * | payload, | ||
| uint8_t | payload_len | ||
| ) |
Definition at line 43 of file event.c.
References event_entry_t::event_id, EVENT_MOD_MAX, EVENT_RING_SIZE, event_entry_t::module_id, event_entry_t::payload, ring, ring_count, ring_head, event_entry_t::severity, and squelch.
Referenced by os_event(), and SVC_Handler_C().
|
static |
Definition at line 27 of file event.c.
Referenced by __event_drain(), __event_init(), and __os_event().
|
static |
Definition at line 29 of file event.c.
Referenced by __event_drain(), __event_get_count(), __event_init(), and __os_event().
|
static |
Definition at line 28 of file event.c.
Referenced by __event_drain(), __event_init(), and __os_event().
|
static |
Definition at line 30 of file event.c.
Referenced by __event_get_squelch(), __event_init(), __event_set_squelch(), and __os_event().