The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/dpdk_rte_lpm/rte_debug.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    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 
    8 /**
    9  * @file
   10  *
   11  * Debug Functions in RTE
   12  *
   13  * This file defines a generic API for debug operations. Part of
   14  * the implementation is architecture-specific.
   15  */
   16 
   17 //#include "rte_log.h"
   18 #include "rte_branch_prediction.h"
   19 
   20 #ifdef __cplusplus
   21 extern "C" {
   22 #endif
   23 
   24 /**
   25  * Dump the stack of the calling core to the console.
   26  */
   27 void rte_dump_stack(void);
   28 
   29 /**
   30  * Dump the registers of the calling core to the console.
   31  *
   32  * Note: Not implemented in a userapp environment; use gdb instead.
   33  */
   34 void rte_dump_registers(void);
   35 
   36 /**
   37  * Provide notification of a critical non-recoverable error and terminate
   38  * execution abnormally.
   39  *
   40  * Display the format string and its expanded arguments (printf-like).
   41  *
   42  * In a linux environment, this function dumps the stack and calls
   43  * abort() resulting in a core dump if enabled.
   44  *
   45  * The function never returns.
   46  *
   47  * @param ...
   48  *   The format string, followed by the variable list of arguments.
   49  */
   50 #define rte_panic(...) rte_panic_(__func__, __VA_ARGS__, "dummy")
   51 #define rte_panic_(func, format, ...) __rte_panic(func, format "%.0s", __VA_ARGS__)
   52 
   53 #ifdef RTE_ENABLE_ASSERT
   54 #define RTE_ASSERT(exp) RTE_VERIFY(exp)
   55 #else
   56 #define RTE_ASSERT(exp) do {} while (0)
   57 #endif
   58 #define RTE_VERIFY(exp) do {                                                  \
   59         if (unlikely(!(exp)))                                                           \
   60                 rte_panic("line %d\tassert \"%s\" failed\n", __LINE__, #exp); \
   61 } while (0)
   62 
   63 /*
   64  * Provide notification of a critical non-recoverable error and stop.
   65  *
   66  * This function should not be called directly. Refer to rte_panic() macro
   67  * documentation.
   68  */
   69 void __rte_panic(const char *funcname , const char *format, ...)
   70 {
   71 #ifdef __GNUC__
   72 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2))
   73         __rte_cold
   74 #endif
   75 #endif
   76         //__rte_noreturn
   77         //__rte_format_printf(2, 3);
   78 
   79 #ifdef __cplusplus
   80 }
   81 #endif
   82 
   83 #endif /* _RTE_DEBUG_H_ */

Cache object: a7fc372ce531684fed9f04d93c52b74a


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.