Commit graph

3 commits

Author SHA1 Message Date
Jordan Yates af515ef87b logging: log_cache: ensure cache contains an entry
Return an error if the provided cache configuration is not large enough
to hold a single entry. An empty `active` and `idle` list causes NULL
dereferences in `log_cache_get`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-13 16:05:18 -04:00
Fabio Baltieri 56b4225126 logging: fix few mismatched CONTAINER_OF
Fix few mismatched CONTAINER_OF, few missing pointers to the first
element, one explicit casting.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-31 14:08:31 +02:00
Krzysztof Chruscinski 1b3a12ce8e logging: Add log_cache module for caching remote names
log_cache is capable of storing fixed length byte arrays
identified by a generic ID. If entry identified by given ID
is not found in cache, the least recently used entry is evicted
from cache.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-10-17 10:16:53 +02:00