Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350899
b: refs/heads/master
c: 6e1888f
h: refs/heads/master
i:
  350897: 9586599
  350895: 4254e62
v: v3
  • Loading branch information
Bob Moore authored and Rafael J. Wysocki committed Jan 10, 2013
1 parent e9d8554 commit 98f80bb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f55994f20523532c02056f8f0d80495c375ee271
refs/heads/master: 6e1888fdcaad176fd9ce1180d97a16f2e6ea707c
36 changes: 20 additions & 16 deletions trunk/include/acpi/acoutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,16 @@
* 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

/* DEBUG_PRINT functions */

Expand All @@ -290,17 +299,21 @@

/* Helper macros for DEBUG_PRINT */

#define ACPI_DEBUG(function, level, line, filename, modulename, component, ...) \
if (ACPI_IS_DEBUG_ENABLED (level, component)) \
{ \
function (level, line, filename, modulename, component, __VA_ARGS__); \
}
#define ACPI_DO_DEBUG_PRINT(function, level, line, filename, modulename, component, ...) \
ACPI_DO_WHILE0 ({ \
if (ACPI_IS_DEBUG_ENABLED (level, component)) \
{ \
function (level, line, filename, modulename, component, __VA_ARGS__); \
} \
})

#define ACPI_ACTUAL_DEBUG(level, line, filename, modulename, component, ...) \
ACPI_DEBUG (acpi_debug_print, level, line, filename, modulename, component, __VA_ARGS__)
ACPI_DO_DEBUG_PRINT (acpi_debug_print, level, line, \
filename, modulename, component, __VA_ARGS__)

#define ACPI_ACTUAL_DEBUG_RAW(level, line, filename, modulename, component, ...) \
ACPI_DEBUG (acpi_debug_print_raw, level, line, filename, modulename, component, __VA_ARGS__)
ACPI_DO_DEBUG_PRINT (acpi_debug_print_raw, level, line, \
filename, modulename, component, __VA_ARGS__)

/*
* Function entry tracing
Expand Down Expand Up @@ -342,16 +355,7 @@
*
* One of the FUNCTION_TRACE macros above must be used in conjunction
* with these macros so that "_AcpiFunctionName" is defined.
*
* Note: the 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

/* Exit trace helper macro */

Expand Down

0 comments on commit 98f80bb

Please sign in to comment.