|
RTE OSAdapter POSIX 0.1.0 build 41b3eb3
POSIX/Linux OAL OSAdapter for Platform_RTE
|
POSIX rte_log OSAdapter: non-blocking best-effort write to stderr (ADR-018 section 2.3), matching REQ-OAL-LOG-001 ("best-effort, non-blocking, must never affect caller control flow"). More...
Go to the source code of this file.
Functions | |
| static const char * | level_to_prefix (rte_log_level_t level) |
| static rte_status_t | osadapter_init (void) |
| static void | osadapter_write (rte_log_level_t level, const char *tag, const char *message) |
| const rte_osadapter_log_t * | rte_posix_osadapter_log (void) |
| The POSIX rte_log OSAdapter (non-blocking write to stderr). | |
Variables | |
| static const rte_osadapter_log_t | s_posix_log_osadapter = { osadapter_init, osadapter_write } |
POSIX rte_log OSAdapter: non-blocking best-effort write to stderr (ADR-018 section 2.3), matching REQ-OAL-LOG-001 ("best-effort, non-blocking, must never affect caller control flow").
Known simplification (stated in ADR-018): no queue, no separate drain thread - a direct fwrite() to stderr. stderr writes are typically fast enough in practice not to violate the non-blocking intent for a first cut, but a deployment wanting a hard non-blocking guarantee (stderr could be a slow pipe/tty under adversarial conditions) should route through a lock-free ring buffer drained by a dedicated low-priority thread instead. write() failures are silently ignored, per REQ-OAL-LOG-001 - logging must never affect caller control flow, so there is nothing meaningful to report back to the caller here.
Definition in file rte_posix_osadapter_log.c.
|
static |
Local makros Local types declarations Local function declarations
Definition at line 45 of file rte_posix_osadapter_log.c.
|
static |
Definition at line 70 of file rte_posix_osadapter_log.c.
|
static |
Definition at line 75 of file rte_posix_osadapter_log.c.
| const rte_osadapter_log_t * rte_posix_osadapter_log | ( | void | ) |
The POSIX rte_log OSAdapter (non-blocking write to stderr).
Global variables declarations Global functions
Definition at line 37 of file rte_posix_osadapter_log.c.
|
static |
Local variables declarations
Definition at line 31 of file rte_posix_osadapter_log.c.