Zephyr Project API  3.2.0
A Scalable Open Source RTOS
log_msg.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_MSG_H_
7#define ZEPHYR_INCLUDE_LOGGING_LOG_MSG_H_
8
11#include <zephyr/sys/cbprintf.h>
12#include <zephyr/sys/atomic.h>
13#include <zephyr/sys/util.h>
14#include <string.h>
15#include <zephyr/toolchain.h>
16
17#ifdef __GNUC__
18#ifndef alloca
19#define alloca __builtin_alloca
20#endif
21#else
22#include <alloca.h>
23#endif
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#define LOG_MSG2_DEBUG 0
30#define LOG_MSG2_DBG(...) IF_ENABLED(LOG_MSG2_DEBUG, (printk(__VA_ARGS__)))
31
32#ifdef CONFIG_LOG_TIMESTAMP_64BIT
34#else
36#endif
37
45#define Z_LOG_MSG2_LOG 0
46
47#define LOG_MSG2_GENERIC_HDR \
48 MPSC_PBUF_HDR;\
49 uint32_t type:1
50
58};
59
63 void *raw;
64};
65
68/* Attempting to keep best alignment. When address is 64 bit and timestamp 32
69 * swap the order to have 16 byte header instead of 24 byte.
70 */
71#if (INTPTR_MAX > INT32_MAX) && !CONFIG_LOG_TIMESTAMP_64BIT
73 const void *source;
74#else
75 const void *source;
77#endif
78};
79
80/* Messages are aligned to alignment required by cbprintf package. */
81#define Z_LOG_MSG2_ALIGNMENT CBPRINTF_PACKAGE_ALIGNMENT
82
83#define Z_LOG_MSG2_PADDING \
84 ((sizeof(struct log_msg_hdr) % Z_LOG_MSG2_ALIGNMENT) > 0 ? \
85 (Z_LOG_MSG2_ALIGNMENT - (sizeof(struct log_msg_hdr) % Z_LOG_MSG2_ALIGNMENT)) : \
86 0)
87
88struct log_msg {
90 /* Adding padding to ensure that cbprintf package that follows is
91 * properly aligned.
92 */
93 uint8_t padding[Z_LOG_MSG2_PADDING];
95};
96
99};
100
104 struct log_msg log;
105};
106
111enum z_log_msg_mode {
112 /* Runtime mode is least efficient but supports all cases thus it is
113 * treated as a fallback method when others cannot be used.
114 */
115 Z_LOG_MSG2_MODE_RUNTIME,
116 /* Mode creates statically a string package on stack and calls a
117 * function for creating a message. It takes code size than
118 * Z_LOG_MSG2_MODE_ZERO_COPY but is a bit slower.
119 */
120 Z_LOG_MSG2_MODE_FROM_STACK,
121
122 /* Mode calculates size of the message and allocates it and writes
123 * directly to the message space. It is the fastest method but requires
124 * more code size.
125 */
126 Z_LOG_MSG2_MODE_ZERO_COPY,
127};
128
129#define Z_LOG_MSG_DESC_INITIALIZER(_domain_id, _level, _plen, _dlen) \
130{ \
131 .valid = 0, \
132 .busy = 0, \
133 .type = Z_LOG_MSG2_LOG, \
134 .domain = _domain_id, \
135 .level = _level, \
136 .package_len = _plen, \
137 .data_len = _dlen, \
138 .reserved = 0, \
139}
140
141#define Z_LOG_MSG2_CBPRINTF_FLAGS(_cstr_cnt) \
142 (CBPRINTF_PACKAGE_FIRST_RO_STR_CNT(_cstr_cnt))
143
144#ifdef CONFIG_LOG_USE_VLA
145#define Z_LOG_MSG2_ON_STACK_ALLOC(ptr, len) \
146 long long _ll_buf[ceiling_fraction(len, sizeof(long long))]; \
147 long double _ld_buf[ceiling_fraction(len, sizeof(long double))]; \
148 ptr = (sizeof(long double) == Z_LOG_MSG2_ALIGNMENT) ? \
149 (struct log_msg *)_ld_buf : (struct log_msg *)_ll_buf; \
150 if (IS_ENABLED(CONFIG_LOG_TEST_CLEAR_MESSAGE_SPACE)) { \
151 /* During test fill with 0's to simplify message comparison */ \
152 memset(ptr, 0, len); \
153 }
154#else /* Z_LOG_MSG2_USE_VLA */
155/* When VLA cannot be used we need to trick compiler a bit and create multiple
156 * fixed size arrays and take the smallest one that will fit the message.
157 * Compiler will remove unused arrays and stack usage will be kept similar
158 * to vla case, rounded to the size of the used buffer.
159 */
160#define Z_LOG_MSG2_ON_STACK_ALLOC(ptr, len) \
161 long long _ll_buf32[32 / sizeof(long long)]; \
162 long long _ll_buf48[48 / sizeof(long long)]; \
163 long long _ll_buf64[64 / sizeof(long long)]; \
164 long long _ll_buf128[128 / sizeof(long long)]; \
165 long long _ll_buf256[256 / sizeof(long long)]; \
166 long double _ld_buf32[32 / sizeof(long double)]; \
167 long double _ld_buf48[48 / sizeof(long double)]; \
168 long double _ld_buf64[64 / sizeof(long double)]; \
169 long double _ld_buf128[128 / sizeof(long double)]; \
170 long double _ld_buf256[256 / sizeof(long double)]; \
171 if (sizeof(long double) == Z_LOG_MSG2_ALIGNMENT) { \
172 ptr = (len > 128) ? (struct log_msg *)_ld_buf256 : \
173 ((len > 64) ? (struct log_msg *)_ld_buf128 : \
174 ((len > 48) ? (struct log_msg *)_ld_buf64 : \
175 ((len > 32) ? (struct log_msg *)_ld_buf48 : \
176 (struct log_msg *)_ld_buf32)));\
177 } else { \
178 ptr = (len > 128) ? (struct log_msg *)_ll_buf256 : \
179 ((len > 64) ? (struct log_msg *)_ll_buf128 : \
180 ((len > 48) ? (struct log_msg *)_ll_buf64 : \
181 ((len > 32) ? (struct log_msg *)_ll_buf48 : \
182 (struct log_msg *)_ll_buf32)));\
183 } \
184 if (IS_ENABLED(CONFIG_LOG_TEST_CLEAR_MESSAGE_SPACE)) { \
185 /* During test fill with 0's to simplify message comparison */ \
186 memset(ptr, 0, len); \
187 }
188#endif /* Z_LOG_MSG2_USE_VLA */
189
190#define Z_LOG_MSG2_ALIGN_OFFSET \
191 offsetof(struct log_msg, data)
192
193#define Z_LOG_MSG2_LEN(pkg_len, data_len) \
194 (offsetof(struct log_msg, data) + pkg_len + (data_len))
195
196#define Z_LOG_MSG2_ALIGNED_WLEN(pkg_len, data_len) \
197 ceiling_fraction(ROUND_UP(Z_LOG_MSG2_LEN(pkg_len, data_len), \
198 Z_LOG_MSG2_ALIGNMENT), \
199 sizeof(uint32_t))
200
201/*
202 * With Zephyr SDK 0.14.2, aarch64-zephyr-elf-gcc (10.3.0) fails to ensure $sp
203 * is below the active memory during message construction. As a result,
204 * interrupts happening in the middle of that process can end up smashing active
205 * data and causing a logging fault. Work around this by inserting a compiler
206 * barrier after the allocation and before any use to make sure GCC moves the
207 * stack pointer soon enough
208 */
209
210#define Z_LOG_ARM64_VLA_PROTECT() compiler_barrier()
211
212#define Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, _dlen, ...) \
213do { \
214 int _plen; \
215 uint32_t flags = Z_LOG_MSG2_CBPRINTF_FLAGS(_cstr_cnt) | \
216 CBPRINTF_PACKAGE_ADD_RW_STR_POS; \
217 if (GET_ARG_N(1, __VA_ARGS__) == NULL) { \
218 _plen = 0; \
219 } else { \
220 CBPRINTF_STATIC_PACKAGE(NULL, 0, _plen, Z_LOG_MSG2_ALIGN_OFFSET, flags, \
221 __VA_ARGS__); \
222 } \
223 struct log_msg *_msg; \
224 Z_LOG_MSG2_ON_STACK_ALLOC(_msg, Z_LOG_MSG2_LEN(_plen, 0)); \
225 Z_LOG_ARM64_VLA_PROTECT(); \
226 if (_plen != 0) { \
227 CBPRINTF_STATIC_PACKAGE(_msg->data, _plen, \
228 _plen, Z_LOG_MSG2_ALIGN_OFFSET, flags, \
229 __VA_ARGS__);\
230 } \
231 struct log_msg_desc _desc = \
232 Z_LOG_MSG_DESC_INITIALIZER(_domain_id, _level, \
233 (uint32_t)_plen, _dlen); \
234 LOG_MSG2_DBG("creating message on stack: package len: %d, data len: %d\n", \
235 _plen, (int)(_dlen)); \
236 z_log_msg_static_create((void *)_source, _desc, _msg->data, _data); \
237} while (false)
238
239#ifdef CONFIG_LOG_SPEED
240#define Z_LOG_MSG2_SIMPLE_CREATE(_cstr_cnt, _domain_id, _source, _level, ...) do { \
241 int _plen; \
242 CBPRINTF_STATIC_PACKAGE(NULL, 0, _plen, Z_LOG_MSG2_ALIGN_OFFSET, \
243 Z_LOG_MSG2_CBPRINTF_FLAGS(_cstr_cnt), \
244 __VA_ARGS__); \
245 size_t _msg_wlen = Z_LOG_MSG2_ALIGNED_WLEN(_plen, 0); \
246 struct log_msg *_msg = z_log_msg_alloc(_msg_wlen); \
247 struct log_msg_desc _desc = \
248 Z_LOG_MSG_DESC_INITIALIZER(_domain_id, _level, (uint32_t)_plen, 0); \
249 LOG_MSG2_DBG("creating message zero copy: package len: %d, msg: %p\n", \
250 _plen, _msg); \
251 if (_msg) { \
252 CBPRINTF_STATIC_PACKAGE(_msg->data, _plen, _plen, \
253 Z_LOG_MSG2_ALIGN_OFFSET, \
254 Z_LOG_MSG2_CBPRINTF_FLAGS(_cstr_cnt), \
255 __VA_ARGS__); \
256 } \
257 z_log_msg_finalize(_msg, (void *)_source, _desc, NULL); \
258} while (false)
259#else
260/* Alternative empty macro created to speed up compilation when LOG_SPEED is
261 * disabled (default).
262 */
263#define Z_LOG_MSG2_SIMPLE_CREATE(...)
264#endif
265
266/* Macro handles case when local variable with log message string is created. It
267 * replaces original string literal with that variable.
268 */
269#define Z_LOG_FMT_ARGS_2(_name, ...) \
270 COND_CODE_1(CONFIG_LOG_FMT_SECTION, \
271 (COND_CODE_0(NUM_VA_ARGS_LESS_1(__VA_ARGS__), \
272 (_name), (_name, GET_ARGS_LESS_N(1, __VA_ARGS__)))), \
273 (__VA_ARGS__))
274
284#define Z_LOG_FMT_ARGS(_name, ...) \
285 COND_CODE_0(NUM_VA_ARGS_LESS_1(_, ##__VA_ARGS__), \
286 (NULL), \
287 (Z_LOG_FMT_ARGS_2(_name, ##__VA_ARGS__)))
288
289#if defined(CONFIG_LOG_USE_TAGGED_ARGUMENTS)
290
291#define Z_LOG_FMT_TAGGED_ARGS_2(_name, ...) \
292 COND_CODE_1(CONFIG_LOG_FMT_SECTION, \
293 (_name, Z_CBPRINTF_TAGGED_ARGS(NUM_VA_ARGS_LESS_1(__VA_ARGS__), \
294 GET_ARGS_LESS_N(1, __VA_ARGS__))), \
295 (GET_ARG_N(1, __VA_ARGS__), \
296 Z_CBPRINTF_TAGGED_ARGS(NUM_VA_ARGS_LESS_1(__VA_ARGS__), \
297 GET_ARGS_LESS_N(1, __VA_ARGS__))))
298
309#define Z_LOG_FMT_TAGGED_ARGS(_name, ...) \
310 COND_CODE_0(NUM_VA_ARGS_LESS_1(_, ##__VA_ARGS__), \
311 (Z_CBPRINTF_TAGGED_ARGS(0)), \
312 (Z_LOG_FMT_TAGGED_ARGS_2(_name, ##__VA_ARGS__)))
313
314#define Z_LOG_FMT_RUNTIME_ARGS(...) \
315 Z_LOG_FMT_TAGGED_ARGS(__VA_ARGS__)
316
317#else
318
319#define Z_LOG_FMT_RUNTIME_ARGS(...) \
320 Z_LOG_FMT_ARGS(__VA_ARGS__)
321
322#endif /* CONFIG_LOG_USE_TAGGED_ARGUMENTS */
323
324/* Macro handles case when there is no string provided, in that case variable
325 * is not created.
326 */
327#define Z_LOG_MSG2_STR_VAR_IN_SECTION(_name, ...) \
328 COND_CODE_0(NUM_VA_ARGS_LESS_1(_, ##__VA_ARGS__), \
329 (/* No args provided, no variable */), \
330 (static const char _name[] \
331 __attribute__((__section__(".log_strings"))) = \
332 GET_ARG_N(1, __VA_ARGS__);))
333
341#define Z_LOG_MSG2_STR_VAR(_name, ...) \
342 IF_ENABLED(CONFIG_LOG_FMT_SECTION, \
343 (Z_LOG_MSG2_STR_VAR_IN_SECTION(_name, ##__VA_ARGS__)))
344
384#if defined(CONFIG_LOG_ALWAYS_RUNTIME) || \
385 (!defined(CONFIG_LOG) && \
386 (!TOOLCHAIN_HAS_PRAGMA_DIAG || !TOOLCHAIN_HAS_C_AUTO_TYPE))
387#define Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, _cstr_cnt, _domain_id, _source,\
388 _level, _data, _dlen, ...) \
389do {\
390 Z_LOG_MSG2_STR_VAR(_fmt, ##__VA_ARGS__) \
391 z_log_msg_runtime_create(_domain_id, (void *)_source, \
392 _level, (uint8_t *)_data, _dlen,\
393 Z_LOG_MSG2_CBPRINTF_FLAGS(_cstr_cnt) | \
394 (IS_ENABLED(CONFIG_LOG_USE_TAGGED_ARGUMENTS) ? \
395 CBPRINTF_PACKAGE_ARGS_ARE_TAGGED : 0), \
396 Z_LOG_FMT_RUNTIME_ARGS(_fmt, ##__VA_ARGS__));\
397 _mode = Z_LOG_MSG2_MODE_RUNTIME; \
398} while (false)
399#else /* CONFIG_LOG_ALWAYS_RUNTIME */
400#define Z_LOG_MSG2_CREATE3(_try_0cpy, _mode, _cstr_cnt, _domain_id, _source,\
401 _level, _data, _dlen, ...) \
402do { \
403 Z_LOG_MSG2_STR_VAR(_fmt, ##__VA_ARGS__); \
404 bool has_rw_str = CBPRINTF_MUST_RUNTIME_PACKAGE( \
405 Z_LOG_MSG2_CBPRINTF_FLAGS(_cstr_cnt), \
406 __VA_ARGS__); \
407 if (IS_ENABLED(CONFIG_LOG_SPEED) && _try_0cpy && ((_dlen) == 0) && !has_rw_str) {\
408 LOG_MSG2_DBG("create zero-copy message\n");\
409 Z_LOG_MSG2_SIMPLE_CREATE(_cstr_cnt, _domain_id, _source, \
410 _level, Z_LOG_FMT_ARGS(_fmt, ##__VA_ARGS__)); \
411 _mode = Z_LOG_MSG2_MODE_ZERO_COPY; \
412 } else { \
413 LOG_MSG2_DBG("create on stack message\n");\
414 Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
415 _dlen, Z_LOG_FMT_ARGS(_fmt, ##__VA_ARGS__)); \
416 _mode = Z_LOG_MSG2_MODE_FROM_STACK; \
417 } \
418 (void)_mode; \
419} while (false)
420
421#if defined(__cplusplus)
422#define Z_AUTO_TYPE auto
423#else
424#define Z_AUTO_TYPE __auto_type
425#endif
426
427/* Macro for getting name of a local variable with the exception of the first argument
428 * which is a formatted string in log message.
429 */
430#define Z_LOG_LOCAL_ARG_NAME(idx, arg) COND_CODE_0(idx, (arg), (_v##idx))
431
432/* Create local variable from input variable (expect for the first (fmt) argument). */
433#define Z_LOG_LOCAL_ARG_CREATE(idx, arg) \
434 COND_CODE_0(idx, (), (Z_AUTO_TYPE Z_LOG_LOCAL_ARG_NAME(idx, arg) = (arg) + 0))
435
436/* First level of processing creates stack variables to be passed for further processing.
437 * This is done to prevent multiple evaluations of input arguments (in case argument
438 * evaluation has side effects, e.g. it is a non-pure function call).
439 */
440#define Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, _cstr_cnt, _domain_id, _source, \
441 _level, _data, _dlen, ...) \
442do { \
443 _Pragma("GCC diagnostic push") \
444 _Pragma("GCC diagnostic ignored \"-Wpointer-arith\"") \
445 FOR_EACH_IDX(Z_LOG_LOCAL_ARG_CREATE, (;), __VA_ARGS__); \
446 _Pragma("GCC diagnostic pop") \
447 Z_LOG_MSG2_CREATE3(_try_0cpy, _mode, _cstr_cnt, _domain_id, _source,\
448 _level, _data, _dlen, \
449 FOR_EACH_IDX(Z_LOG_LOCAL_ARG_NAME, (,), __VA_ARGS__)); \
450} while (false)
451#endif /* CONFIG_LOG_ALWAYS_RUNTIME ||
452 * (!LOG && (!TOOLCHAIN_HAS_PRAGMA_DIAG || !TOOLCHAIN_HAS_C_AUTO_TYPE))
453 */
454
455
456#define Z_LOG_MSG2_CREATE(_try_0cpy, _mode, _domain_id, _source,\
457 _level, _data, _dlen, ...) \
458 Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
459 _domain_id, _source, _level, _data, _dlen, \
460 Z_LOG_STR(_level, __VA_ARGS__))
461
468struct log_msg *z_log_msg_alloc(uint32_t wlen);
469
483void z_log_msg_finalize(struct log_msg *msg, const void *source,
484 const struct log_msg_desc desc, const void *data);
485
496__syscall void z_log_msg_static_create(const void *source,
497 const struct log_msg_desc desc,
498 uint8_t *package, const void *data);
499
521__syscall void z_log_msg_runtime_vcreate(uint8_t domain_id, const void *source,
522 uint8_t level, const void *data,
523 size_t dlen, uint32_t package_flags,
524 const char *fmt,
525 va_list ap);
526
548static inline void z_log_msg_runtime_create(uint8_t domain_id,
549 const void *source,
550 uint8_t level, const void *data,
551 size_t dlen, uint32_t package_flags,
552 const char *fmt, ...)
553{
554 va_list ap;
555
556 va_start(ap, fmt);
557 z_log_msg_runtime_vcreate(domain_id, source, level,
558 data, dlen, package_flags, fmt, ap);
559 va_end(ap);
560}
561
562static inline bool z_log_item_is_msg(const union log_msg_generic *msg)
563{
564 return msg->generic.type == Z_LOG_MSG2_LOG;
565}
566
573static inline uint32_t log_msg_get_total_wlen(const struct log_msg_desc desc)
574{
575 return Z_LOG_MSG2_ALIGNED_WLEN(desc.package_len, desc.data_len);
576}
577
585{
586 const union log_msg_generic *generic_msg = (const union log_msg_generic *)item;
587
588 if (z_log_item_is_msg(generic_msg)) {
589 const struct log_msg *msg = (const struct log_msg *)generic_msg;
590
591 return log_msg_get_total_wlen(msg->hdr.desc);
592 }
593
594 return 0;
595}
596
603static inline uint8_t log_msg_get_domain(struct log_msg *msg)
604{
605 return msg->hdr.desc.domain;
606}
607
614static inline uint8_t log_msg_get_level(struct log_msg *msg)
615{
616 return msg->hdr.desc.level;
617}
618
625static inline const void *log_msg_get_source(struct log_msg *msg)
626{
627 return msg->hdr.source;
628}
629
637{
638 return msg->hdr.timestamp;
639}
640
649static inline uint8_t *log_msg_get_data(struct log_msg *msg, size_t *len)
650{
651 *len = msg->hdr.desc.data_len;
652
653 return msg->data + msg->hdr.desc.package_len;
654}
655
664static inline uint8_t *log_msg_get_package(struct log_msg *msg, size_t *len)
665{
666 *len = msg->hdr.desc.package_len;
667
668 return msg->data;
669}
670
675#include <syscalls/log_msg.h>
676
677#ifdef __cplusplus
678}
679#endif
680
681#endif /* ZEPHYR_INCLUDE_LOGGING_LOG_MSG_H_ */
static const void * log_msg_get_source(struct log_msg *msg)
Get message source data.
Definition: log_msg.h:625
#define LOG_MSG2_GENERIC_HDR
Definition: log_msg.h:47
static uint8_t log_msg_get_level(struct log_msg *msg)
Get log message level.
Definition: log_msg.h:614
static uint8_t log_msg_get_domain(struct log_msg *msg)
Get log message domain ID.
Definition: log_msg.h:603
static uint32_t log_msg_generic_get_wlen(const union mpsc_pbuf_generic *item)
Get length of the log item.
Definition: log_msg.h:584
static uint32_t log_msg_get_total_wlen(const struct log_msg_desc desc)
Get total length (in 32 bit words) of a log message.
Definition: log_msg.h:573
static uint8_t * log_msg_get_package(struct log_msg *msg, size_t *len)
Get string package.
Definition: log_msg.h:664
static log_timestamp_t log_msg_get_timestamp(struct log_msg *msg)
Get timestamp.
Definition: log_msg.h:636
static uint8_t * log_msg_get_data(struct log_msg *msg, size_t *len)
Get data buffer.
Definition: log_msg.h:649
uint32_t log_timestamp_t
Definition: log_msg.h:35
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
Definition: log_msg.h:51
uint32_t domain
Definition: log_msg.h:53
uint32_t package_len
Definition: log_msg.h:55
uint32_t level
Definition: log_msg.h:54
uint32_t reserved
Definition: log_msg.h:57
uint32_t data_len
Definition: log_msg.h:56
Definition: log_msg.h:97
Definition: log_msg.h:66
struct log_msg_desc desc
Definition: log_msg.h:67
log_timestamp_t timestamp
Definition: log_msg.h:76
const void * source
Definition: log_msg.h:75
Definition: log_msg.h:88
uint8_t data[]
Definition: log_msg.h:94
uint8_t padding[((sizeof(struct log_msg_hdr) % CBPRINTF_PACKAGE_ALIGNMENT) > 0 ?(CBPRINTF_PACKAGE_ALIGNMENT -(sizeof(struct log_msg_hdr) % CBPRINTF_PACKAGE_ALIGNMENT)) :0)]
Definition: log_msg.h:93
struct log_msg_hdr hdr
Definition: log_msg.h:89
Constant data associated with the source of log messages.
Definition: log_instance.h:16
Dynamic data associated with the source of log messages.
Definition: log_instance.h:29
static fdata_t data[2]
Definition: test_fifo_contexts.c:15
static void msg(uint64_t c64)
Definition: main.c:17
Macros to abstract toolchain specific capabilities.
Definition: log_msg.h:101
union mpsc_pbuf_generic buf
Definition: log_msg.h:102
struct log_msg log
Definition: log_msg.h:104
struct log_msg_generic_hdr generic
Definition: log_msg.h:103
Definition: log_msg.h:60
const struct log_source_const_data * fixed
Definition: log_msg.h:61
struct log_source_dynamic_data * dynamic
Definition: log_msg.h:62
void * raw
Definition: log_msg.h:63
Generic packet header.
Definition: mpsc_packet.h:49
Misc utilities.