![]() |
|
|||
0001 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ 0002 /****************************************************************************** 0003 * 0004 * Name: acgcc.h - GCC specific defines, etc. 0005 * 0006 * Copyright (C) 2000 - 2022, Intel Corp. 0007 * 0008 *****************************************************************************/ 0009 0010 #ifndef __ACGCC_H__ 0011 #define __ACGCC_H__ 0012 0013 #ifndef va_arg 0014 #ifdef __KERNEL__ 0015 #include <linux/stdarg.h> 0016 #else 0017 #include <stdarg.h> 0018 #endif /* __KERNEL__ */ 0019 #endif /* ! va_arg */ 0020 0021 #define ACPI_INLINE __inline__ 0022 0023 /* Function name is used for debug output. Non-ANSI, compiler-dependent */ 0024 0025 #define ACPI_GET_FUNCTION_NAME __func__ 0026 0027 /* 0028 * This macro is used to tag functions as "printf-like" because 0029 * some compilers (like GCC) can catch printf format string problems. 0030 */ 0031 #define ACPI_PRINTF_LIKE(c) __attribute__ ((__format__ (__printf__, c, c+1))) 0032 0033 /* 0034 * Some compilers complain about unused variables. Sometimes we don't want to 0035 * use all the variables (for example, _acpi_module_name). This allows us 0036 * to tell the compiler warning in a per-variable manner that a variable 0037 * is unused. 0038 */ 0039 #define ACPI_UNUSED_VAR __attribute__ ((unused)) 0040 0041 /* GCC supports __VA_ARGS__ in macros */ 0042 0043 #define COMPILER_VA_MACRO 1 0044 0045 /* GCC supports native multiply/shift on 32-bit platforms */ 0046 0047 #define ACPI_USE_NATIVE_MATH64 0048 0049 /* GCC did not support __has_attribute until 5.1. */ 0050 0051 #ifndef __has_attribute 0052 #define __has_attribute(x) 0 0053 #endif 0054 0055 /* 0056 * Explicitly mark intentional explicit fallthrough to silence 0057 * -Wimplicit-fallthrough in GCC 7.1+. 0058 */ 0059 0060 #if __has_attribute(__fallthrough__) 0061 #define ACPI_FALLTHROUGH __attribute__((__fallthrough__)) 0062 #endif 0063 0064 #endif /* __ACGCC_H__ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |