summaryrefslogtreecommitdiff
path: root/source/include/platform/acgcc.h
diff options
context:
space:
mode:
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__ */