DPDK
21.11.6
lib
eal
include
rte_debug.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright(c) 2010-2014 Intel Corporation
3
*/
4
5
#ifndef _RTE_DEBUG_H_
6
#define _RTE_DEBUG_H_
7
17
#include "
rte_log.h
"
18
#include "
rte_branch_prediction.h
"
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
27
void
rte_dump_stack
(
void
);
28
43
#define rte_panic(...) rte_panic_(__func__, __VA_ARGS__, "dummy")
44
#define rte_panic_(func, format, ...) __rte_panic(func, format "%.0s", __VA_ARGS__)
45
46
#ifdef RTE_ENABLE_ASSERT
47
#define RTE_ASSERT(exp) RTE_VERIFY(exp)
48
#else
49
#define RTE_ASSERT(exp) do {} while (0)
50
#endif
51
#define RTE_VERIFY(exp) do { \
52
if (unlikely(!(exp))) \
53
rte_panic("line %d\tassert \"%s\" failed\n", __LINE__, #exp); \
54
} while (0)
55
56
/*
57
* Provide notification of a critical non-recoverable error and stop.
58
*
59
* This function should not be called directly. Refer to rte_panic() macro
60
* documentation.
61
*/
62
void
__rte_panic(
const
char
*funcname ,
const
char
*format, ...)
63
#ifdef __GNUC__
64
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2))
65
__rte_cold
66
#endif
67
#endif
68
__rte_noreturn
69
__rte_format_printf
(2, 3);
70
71
#ifdef __cplusplus
72
}
73
#endif
74
75
#endif
/* _RTE_DEBUG_H_ */
rte_dump_stack
void rte_dump_stack(void)
rte_log.h
__rte_format_printf
#define __rte_format_printf(format_index, first_arg)
Definition:
rte_common.h:151
rte_branch_prediction.h
__rte_cold
#define __rte_cold
Definition:
rte_common.h:248
__rte_noreturn
#define __rte_noreturn
Definition:
rte_common.h:228
Generated by
1.8.17