本文整理汇总了C++中ACPI_IS_DEBUG_ENABLED函数的典型用法代码示例。如果您正苦于以下问题:C++ ACPI_IS_DEBUG_ENABLED函数的具体用法?C++ ACPI_IS_DEBUG_ENABLED怎么用?C++ ACPI_IS_DEBUG_ENABLED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ACPI_IS_DEBUG_ENABLED函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AcpiRsDumpIrqList
void
AcpiRsDumpIrqList (
UINT8 *RouteTable)
{
ACPI_PCI_ROUTING_TABLE *PrtElement;
UINT8 Count;
ACPI_FUNCTION_ENTRY ();
/* Check if debug output enabled */
if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
{
return;
}
PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, RouteTable);
/* Dump all table elements, Exit on zero length element */
for (Count = 0; PrtElement->Length; Count++)
{
AcpiOsPrintf ("\n[%02X] PCI IRQ Routing Table Package\n", Count);
AcpiRsDumpDescriptor (PrtElement, AcpiRsDumpPrt);
PrtElement = ACPI_ADD_PTR (ACPI_PCI_ROUTING_TABLE,
PrtElement, PrtElement->Length);
}
}
示例2: acpi_ns_print_pathname
void acpi_ns_print_pathname(u32 num_segments, char *pathname)
{
u32 i;
ACPI_FUNCTION_NAME(ns_print_pathname);
/* Check if debug output enabled */
if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_NAMES, ACPI_NAMESPACE)) {
return;
}
/* Print the entire name */
ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "["));
while (num_segments) {
for (i = 0; i < 4; i++) {
isprint((int)pathname[i]) ?
acpi_os_printf("%c", pathname[i]) :
acpi_os_printf("?");
}
pathname += ACPI_NAME_SIZE;
num_segments--;
if (num_segments) {
acpi_os_printf(".");
}
}
acpi_os_printf("]\n");
}
示例3: AcpiUtStatusExit
void
AcpiUtStatusExit (
UINT32 LineNumber,
const char *FunctionName,
const char *ModuleName,
UINT32 ComponentId,
ACPI_STATUS Status)
{
/* Check if enabled up-front for performance */
if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
{
if (ACPI_SUCCESS (Status))
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
"%s %s\n", AcpiGbl_FnExitStr,
AcpiFormatException (Status));
}
else
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
"%s ****Exception****: %s\n", AcpiGbl_FnExitStr,
AcpiFormatException (Status));
}
}
if (AcpiGbl_NestingLevel)
{
AcpiGbl_NestingLevel--;
}
}
示例4: acpi_ut_status_exit
/*******************************************************************************
*
* FUNCTION: acpi_ut_status_exit
*
* PARAMETERS: line_number - Caller's line number
* function_name - Caller's procedure name
* module_name - Caller's module name
* component_id - Caller's component ID
* status - Exit status code
*
* RETURN: None
*
* DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
* set in debug_level. Prints exit status also.
*
******************************************************************************/
void
acpi_ut_status_exit(u32 line_number,
const char *function_name,
const char *module_name,
u32 component_id, acpi_status status)
{
/* Check if enabled up-front for performance */
if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
if (ACPI_SUCCESS(status)) {
acpi_debug_print(ACPI_LV_FUNCTIONS,
line_number, function_name,
module_name, component_id, "%s %s\n",
acpi_gbl_fn_exit_str,
acpi_format_exception(status));
} else {
acpi_debug_print(ACPI_LV_FUNCTIONS,
line_number, function_name,
module_name, component_id,
"%s ****Exception****: %s\n",
acpi_gbl_fn_exit_str,
acpi_format_exception(status));
}
}
if (acpi_gbl_nesting_level) {
acpi_gbl_nesting_level--;
}
}
示例5: acpi_rs_dump_irq_list
void acpi_rs_dump_irq_list(u8 *route_table)
{
struct acpi_pci_routing_table *prt_element;
u8 count;
ACPI_FUNCTION_ENTRY();
/* Check if debug output enabled */
if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_RESOURCES, _COMPONENT)) {
return;
}
prt_element = ACPI_CAST_PTR(struct acpi_pci_routing_table, route_table);
/* Dump all table elements, Exit on zero length element */
for (count = 0; prt_element->length; count++) {
acpi_os_printf("\n[%02X] PCI IRQ Routing Table Package\n",
count);
acpi_rs_dump_descriptor(prt_element, acpi_rs_dump_prt);
prt_element = ACPI_ADD_PTR(struct acpi_pci_routing_table,
prt_element, prt_element->length);
}
}
示例6: acpi_rs_dump_resource_list
void acpi_rs_dump_resource_list(struct acpi_resource *resource_list)
{
u32 count = 0;
u32 type;
ACPI_FUNCTION_ENTRY();
/* Check if debug output enabled */
if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_RESOURCES, _COMPONENT)) {
return;
}
/* Walk list and dump all resource descriptors (END_TAG terminates) */
do {
acpi_os_printf("\n[%02X] ", count);
count++;
/* Validate Type before dispatch */
type = resource_list->type;
if (type > ACPI_RESOURCE_TYPE_MAX) {
acpi_os_printf
("Invalid descriptor type (%X) in resource list\n",
resource_list->type);
return;
}
/* Sanity check the length. It must not be zero, or we loop forever */
if (!resource_list->length) {
acpi_os_printf
("Invalid zero length descriptor in resource list\n");
return;
}
/* Dump the resource descriptor */
if (type == ACPI_RESOURCE_TYPE_SERIAL_BUS) {
acpi_rs_dump_descriptor(&resource_list->data,
acpi_gbl_dump_serial_bus_dispatch
[resource_list->data.
common_serial_bus.type]);
} else {
acpi_rs_dump_descriptor(&resource_list->data,
acpi_gbl_dump_resource_dispatch
[type]);
}
/* Point to the next resource structure */
resource_list = ACPI_NEXT_RESOURCE(resource_list);
/* Exit when END_TAG descriptor is reached */
} while (type != ACPI_RESOURCE_TYPE_END_TAG);
}
示例7: acpi_debug_print
void ACPI_INTERNAL_VAR_XFACE
acpi_debug_print(u32 requested_debug_level,
u32 line_number,
const char *function_name,
const char *module_name,
u32 component_id, const char *format, ...)
{
acpi_thread_id thread_id;
va_list args;
/* Check if debug output enabled */
if (!ACPI_IS_DEBUG_ENABLED(requested_debug_level, component_id)) {
return;
}
/*
* Thread tracking and context switch notification
*/
thread_id = acpi_os_get_thread_id();
if (thread_id != acpi_gbl_prev_thread_id) {
if (ACPI_LV_THREADS & acpi_dbg_level) {
acpi_os_printf
("\n**** Context Switch from TID %u to TID %u ****\n\n",
(u32)acpi_gbl_prev_thread_id, (u32)thread_id);
}
acpi_gbl_prev_thread_id = thread_id;
acpi_gbl_nesting_level = 0;
}
/*
* Display the module name, current line number, thread ID (if requested),
* current procedure nesting level, and the current procedure name
*/
acpi_os_printf("%9s-%04ld ", module_name, line_number);
#ifdef ACPI_APPLICATION
/*
* For acpi_exec/iASL only, emit the thread ID and nesting level.
* Note: nesting level is really only useful during a single-thread
* execution. Otherwise, multiple threads will keep resetting the
* level.
*/
if (ACPI_LV_THREADS & acpi_dbg_level) {
acpi_os_printf("[%u] ", (u32)thread_id);
}
acpi_os_printf("[%02ld] ", acpi_gbl_nesting_level);
#endif
acpi_os_printf("%-22.22s: ", acpi_ut_trim_function_name(function_name));
va_start(args, format);
acpi_os_vprintf(format, args);
va_end(args);
}
示例8: AcpiDebugPrint
void ACPI_INTERNAL_VAR_XFACE
AcpiDebugPrint (
UINT32 RequestedDebugLevel,
UINT32 LineNumber,
const char *FunctionName,
const char *ModuleName,
UINT32 ComponentId,
const char *Format,
...)
{
ACPI_THREAD_ID ThreadId;
va_list args;
/* Check if debug output enabled */
if (!ACPI_IS_DEBUG_ENABLED (RequestedDebugLevel, ComponentId))
{
return;
}
/*
* Thread tracking and context switch notification
*/
ThreadId = AcpiOsGetThreadId ();
if (ThreadId != AcpiGbl_PrevThreadId)
{
if (ACPI_LV_THREADS & AcpiDbgLevel)
{
AcpiOsPrintf (
"\n**** Context Switch from TID %u to TID %u ****\n\n",
(UINT32) AcpiGbl_PrevThreadId, (UINT32) ThreadId);
}
AcpiGbl_PrevThreadId = ThreadId;
}
/*
* Display the module name, current line number, thread ID (if requested),
* current procedure nesting level, and the current procedure name
*/
AcpiOsPrintf ("%9s-%04ld ", ModuleName, LineNumber);
if (ACPI_LV_THREADS & AcpiDbgLevel)
{
AcpiOsPrintf ("[%u] ", (UINT32) ThreadId);
}
AcpiOsPrintf ("[%02ld] %-22.22s: ",
AcpiGbl_NestingLevel, AcpiUtTrimFunctionName (FunctionName));
va_start (args, Format);
AcpiOsVprintf (Format, args);
va_end (args);
}
示例9: acpi_ut_trace
/*******************************************************************************
*
* FUNCTION: acpi_ut_trace
*
* PARAMETERS: line_number - Caller's line number
* function_name - Caller's procedure name
* module_name - Caller's module name
* component_id - Caller's component ID
*
* RETURN: None
*
* DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
* set in debug_level
*
******************************************************************************/
void
acpi_ut_trace(u32 line_number,
const char *function_name,
const char *module_name, u32 component_id)
{
acpi_gbl_nesting_level++;
acpi_ut_track_stack_ptr();
/* Check if enabled up-front for performance */
if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
acpi_debug_print(ACPI_LV_FUNCTIONS,
line_number, function_name, module_name,
component_id, "%s\n", acpi_gbl_fn_entry_str);
}
}
示例10: acpi_ns_dump_pathname
void
acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component)
{
ACPI_FUNCTION_TRACE(ns_dump_pathname);
/* Do this only if the requested debug level and component are enabled */
if (!ACPI_IS_DEBUG_ENABLED(level, component)) {
return_VOID;
}
/* Convert handle to a full pathname and print it (with supplied message) */
acpi_ns_print_node_pathname(handle, msg);
acpi_os_printf("\n");
return_VOID;
}
示例11: acpi_ut_ptr_exit
/*******************************************************************************
*
* FUNCTION: acpi_ut_ptr_exit
*
* PARAMETERS: line_number - Caller's line number
* function_name - Caller's procedure name
* module_name - Caller's module name
* component_id - Caller's component ID
* ptr - Pointer to display
*
* RETURN: None
*
* DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
* set in debug_level. Prints exit value also.
*
******************************************************************************/
void
acpi_ut_ptr_exit(u32 line_number,
const char *function_name,
const char *module_name, u32 component_id, u8 *ptr)
{
/* Check if enabled up-front for performance */
if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
acpi_debug_print(ACPI_LV_FUNCTIONS,
line_number, function_name, module_name,
component_id, "%s %p\n", acpi_gbl_fn_exit_str,
ptr);
}
if (acpi_gbl_nesting_level) {
acpi_gbl_nesting_level--;
}
}
示例12: acpi_debug_print_raw
/*******************************************************************************
*
* FUNCTION: acpi_debug_print_raw
*
* PARAMETERS: requested_debug_level - Requested debug print level
* line_number - Caller's line number
* function_name - Caller's procedure name
* module_name - Caller's module name
* component_id - Caller's component ID
* format - Printf format field
* ... - Optional printf arguments
*
* RETURN: None
*
* DESCRIPTION: Print message with no headers. Has same interface as
* debug_print so that the same macros can be used.
*
******************************************************************************/
void ACPI_INTERNAL_VAR_XFACE
acpi_debug_print_raw(u32 requested_debug_level,
u32 line_number,
const char *function_name,
const char *module_name,
u32 component_id, const char *format, ...)
{
va_list args;
/* Check if debug output enabled */
if (!ACPI_IS_DEBUG_ENABLED(requested_debug_level, component_id)) {
return;
}
va_start(args, format);
acpi_os_vprintf(format, args);
va_end(args);
}
示例13: AcpiUtExit
void
AcpiUtExit (
UINT32 LineNumber,
const char *FunctionName,
const char *ModuleName,
UINT32 ComponentId)
{
/* Check if enabled up-front for performance */
if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
"%s\n", AcpiGbl_FnExitStr);
}
AcpiGbl_NestingLevel--;
}
示例14: acpi_ut_value_exit
/*******************************************************************************
*
* FUNCTION: acpi_ut_value_exit
*
* PARAMETERS: line_number - Caller's line number
* function_name - Caller's procedure name
* module_name - Caller's module name
* component_id - Caller's component ID
* value - Value to be printed with exit msg
*
* RETURN: None
*
* DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
* set in debug_level. Prints exit value also.
*
******************************************************************************/
void
acpi_ut_value_exit(u32 line_number,
const char *function_name,
const char *module_name, u32 component_id, u64 value)
{
/* Check if enabled up-front for performance */
if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
acpi_debug_print(ACPI_LV_FUNCTIONS,
line_number, function_name, module_name,
component_id, "%s %8.8X%8.8X\n",
acpi_gbl_fn_exit_str,
ACPI_FORMAT_UINT64(value));
}
if (acpi_gbl_nesting_level) {
acpi_gbl_nesting_level--;
}
}
示例15: AcpiUtTrace
void
AcpiUtTrace (
UINT32 LineNumber,
const char *FunctionName,
const char *ModuleName,
UINT32 ComponentId)
{
AcpiGbl_NestingLevel++;
AcpiUtTrackStackPtr ();
/* Check if enabled up-front for performance */
if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
"%s\n", AcpiGbl_FunctionEntryPrefix);
}
}