Zephyr API Documentation  3.0.0
A Scalable Open Source RTOS
3.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
log_internal.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_INTERNAL_H_
7#define ZEPHYR_INCLUDE_LOGGING_LOG_INTERNAL_H_
8
9#include <zephyr/types.h>
10#include <sys/__assert.h>
11#include <logging/log_core.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17/* Header contains declarations of functions used internally in the logging,
18 * shared between various portions of logging subsystem. Functions are internal
19 * not intended to be used outside, including logging backends.
20 */
21
28void z_log_dropped(bool buffered);
29
34uint32_t z_log_dropped_read_and_clear(void);
35
41bool z_log_dropped_pending(void);
42
47void z_log_free(void *buf);
48
49/* Initialize runtime filters */
50void z_log_runtime_filters_init(void);
51
52/* Notify log_core that a backend was enabled. */
53void z_log_notify_backend_enabled(void);
54
61static inline uint32_t *z_log_dynamic_filters_get(uint32_t source_id)
62{
63 return &__log_dynamic_start[source_id].filters;
64}
65
67static inline uint32_t z_log_sources_count(void)
68{
69 return log_const_source_id(__log_const_end);
70}
71
73void z_log_msg2_init(void);
74
79void z_log_msg2_commit(struct log_msg2 *msg);
80
87union log_msg2_generic *z_log_msg2_claim(void);
88
93void z_log_msg2_free(union log_msg2_generic *msg);
94
100bool z_log_msg2_pending(void);
101
106const char *z_log_get_tag(void);
107
108#ifdef __cplusplus
109}
110#endif
111
112#endif /* ZEPHYR_INCLUDE_LOGGING_LOG_INTERNAL_H_ */
static uint32_t log_const_source_id(const struct log_source_const_data *data)
Get index of the log source based on the address of the constant data associated with the source.
Definition: log_core.h:549
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
Definition: log_msg2.h:85
uint32_t filters
Definition: log_instance.h:30
static void msg(uint64_t c64)
Definition: main.c:17
Definition: log_msg2.h:94