RPV Event driven kernel
Loading...
Searching...
No Matches
Kernel system journal subsystem

Kernel system events journal API extending kernel shell runtime with journal manipulation commands. More...

Functions

void _kernel_jentry (char const *fmt,...)
 Appends a formatted entry to the kernel journal.
 
bool _kernel_jnxtentry (char *entry, const size_t max_len, size_t *const entry_len)
 Retrieves the next journal entry.
 

Detailed Description

Kernel system events journal API extending kernel shell runtime with journal manipulation commands.

Function Documentation

◆ _kernel_jentry()

void _kernel_jentry ( char const *  fmt,
  ... 
)

Appends a formatted entry to the kernel journal.

Parameters
[in]fmtFormat string.
[in]...Variable arguments corresponding to format specifiers.
Precondition
  • fmt must not be NULL.

Formats a journal entry according to implementation-defined formatting rules (printf-like) and appends it to the internal journal buffer or log storage.

The journal is implemented as a circular memory buffer

Entry size limits and truncation behavior are implementation-defined.

Side Effects:
  • Modifies internal journal buffer state.
  • May trigger storage or console output.
Warning
  • Must not be called from contexts where formatting or memory allocation is unsafe (e.g., certain interrupt contexts)

◆ _kernel_jnxtentry()

bool _kernel_jnxtentry ( char *  entry,
const size_t  max_len,
size_t *const  entry_len 
)

Retrieves the next journal entry.

Parameters
[out]entryBuffer receiving the journal entry string.
[in]max_lenMaximum buffer length in bytes.
[out]entry_lenOptional pointer receiving actual entry length.
Return values
trueAn entry was retrieved successfully.
falseNo more entries available.
Precondition
  • entry must not be NULL if max_len > 0.
  • max_len > 0.
Postcondition
  • entry contains a null-terminated string if true is returned.
  • *entry_len contains the length of the entry (excluding null terminator) if entry_len is not NULL.

Retrieves the next available journal entry from the internal journal storage.

If the provided buffer is too small, the entry may be truncated according to implementation-defined rules.

Iteration is cursor-based.

Side Effects:
  • May update internal journal read cursor.