summaryrefslogtreecommitdiff
path: root/source/include/platform/acgcc.h
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2016-12-21 08:34:01 -0800
committerGitHub <noreply@github.com>2016-12-21 08:34:01 -0800
commit73b741b6055299f93d788fda15d134b5a228aec2 (patch)
tree340a5dfb83217a3e2013213abc6db1ddac2685f8 /source/include/platform/acgcc.h
parentb7dae343fbb8c392999a66f5e08be5744a5d07e2 (diff)
parent93d652bbfca28ff825d7d472e2a10fdda3189d3d (diff)
downloadacpica-73b741b6055299f93d788fda15d134b5a228aec2.tar.gz
Merge pull request #196 from zetalog/acpica-trivial
Acpica trivial
Diffstat (limited to 'source/include/platform/acgcc.h')
-rw-r--r--source/include/platform/acgcc.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/include/platform/acgcc.h b/source/include/platform/acgcc.h
index 097539ca8..5ec3ffd32 100644
--- a/source/include/platform/acgcc.h
+++ b/source/include/platform/acgcc.h
@@ -146,4 +146,19 @@
#define COMPILER_VA_MACRO 1
+/* GCC supports _ONCE macros */
+
+#define ACPI_DO_ONCE(plist) \
+({ \
+ static BOOLEAN __AcpiErrorOnce__ = FALSE; \
+ if (!__AcpiErrorOnce__) \
+ { \
+ if (AcpiGbl_EnableDoOnceMacro) \
+ { \
+ __AcpiErrorOnce__ = TRUE; \
+ } \
+ plist; \
+ } \
+})
+
#endif /* __ACGCC_H__ */