/* * Debug levels and component IDs. These are used to control the * granularity of the output of the ACPI_DEBUG_PRINT macro -- on a * per-component basis and a per-exception-type basis.
*/
/* Component IDs are used in the global "DebugLayer" */
/* * Raw debug output levels, do not use these in the ACPI_DEBUG_PRINT macros
*/ #define ACPI_LV_INIT 0x00000001 #define ACPI_LV_DEBUG_OBJECT 0x00000002 #define ACPI_LV_INFO 0x00000004 #define ACPI_LV_REPAIR 0x00000008 #define ACPI_LV_TRACE_POINT 0x00000010 #define ACPI_LV_ALL_EXCEPTIONS 0x0000001F
#ifdefined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES) /* * The module name is used primarily for error and debug messages. * The __FILE__ macro is not very useful for this, because it * usually includes the entire pathname to the module making the * debug output difficult to read.
*/ #define ACPI_MODULE_NAME(name) staticconstchar ACPI_UNUSED_VAR _acpi_module_name[] = name; #else /* * For the no-debug and no-error-msg cases, we must at least define * a null module name.
*/ #define ACPI_MODULE_NAME(name) #define _acpi_module_name "" #endif
/* * Ascii error messages can be configured out
*/ #ifndef ACPI_NO_ERROR_MESSAGES #define AE_INFO _acpi_module_name, __LINE__ #define ACPI_ONCE(_fn, _plist) { staticchar _done; if (!_done) { _done = 1; _fn _plist; } }
/* * Error reporting. Callers module and line number are inserted by AE_INFO, * the plist contains a set of parens to allow variable-length lists. * These macros are used for both the debug and non-debug versions of the code.
*/ #define ACPI_INFO(plist) acpi_info plist #define ACPI_WARNING(plist) acpi_warning plist #define ACPI_WARNING_ONCE(plist) ACPI_ONCE(acpi_warning, plist) #define ACPI_EXCEPTION(plist) acpi_exception plist #define ACPI_ERROR(plist) acpi_error plist #define ACPI_ERROR_ONCE(plist) ACPI_ONCE(acpi_error, plist) #define ACPI_BIOS_WARNING(plist) acpi_bios_warning plist #define ACPI_BIOS_EXCEPTION(plist) acpi_bios_exception plist #define ACPI_BIOS_ERROR(plist) acpi_bios_error plist #define ACPI_DEBUG_OBJECT(obj,l,i) acpi_ex_do_debug_object(obj,l,i)
/* * Debug macros that are conditionally compiled
*/ #ifdef ACPI_DEBUG_OUTPUT
/* * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header, * define it now. This is the case where there the compiler does not support * a __func__ macro or equivalent.
*/ #ifndef ACPI_GET_FUNCTION_NAME #define ACPI_GET_FUNCTION_NAME _acpi_function_name
/* * The Name parameter should be the procedure name as a non-quoted string. * The function name is also used by the function exit macros below. * Note: (const char) is used to be compatible with the debug interfaces * and macros such as __func__.
*/ #define ACPI_FUNCTION_NAME(name) staticconstchar _acpi_function_name[] = #name;
/* * Common parameters used for debug output functions: * line number, function name, module(file) name, component ID
*/ #define ACPI_DEBUG_PARAMETERS \
__LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
/* Check if debug output is currently dynamically enabled */
/* * Master debug print macros * Print message if and only if: * 1) Debug print for the current component is enabled * 2) Debug error level or trace level for the print statement is enabled * * November 2012: Moved the runtime check for whether to actually emit the * debug message outside of the print function itself. This improves overall * performance at a relatively small code cost. Implementation involves the * use of variadic macros supported by C99. * * Note: the ACPI_DO_WHILE0 macro is used to prevent some compilers from * complaining about these constructs. On other compilers the do...while * adds some extra code, so this feature is optional.
*/ #ifdef ACPI_USE_DO_WHILE_0 #define ACPI_DO_WHILE0(a) do a while(0) #else #define ACPI_DO_WHILE0(a) a #endif
/* * Function entry tracing * * The name of the function is emitted as a local variable that is * intended to be used by both the entry trace and the exit trace.
*/
/* * Function exit tracing * * These macros include a return statement. This is usually considered * bad form, but having a separate exit macro before the actual return * is very ugly and difficult to maintain. * * One of the FUNCTION_TRACE macros above must be used in conjunction * with these macros so that "_AcpiFunctionName" is defined. * * There are two versions of most of the return macros. The default version is * safer, since it avoids side-effects by guaranteeing that the argument will * not be evaluated twice. * * A less-safe version of the macros is provided for optional use if the * compiler uses excessive CPU stack (for example, this may happen in the * debug case if code optimization is disabled.)
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.