1 /* 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2010 Isilon Systems, Inc. 5 * Copyright (c) 2010 iX Systems, Inc. 6 * Copyright (c) 2010 Panasas, Inc. 7 * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. 8 * Copyright (c) 2015 François Tigeot 9 * All rights reserved. 10 */ 11 12 #ifndef _LINUXKPI_LINUX_COMPILER_ATTRIBUTES_H_ 13 #define _LINUXKPI_LINUX_COMPILER_ATTRIBUTES_H_ 14 15 #include <sys/cdefs.h> 16 17 #define __attribute_const__ __attribute__((__const__)) 18 19 #ifndef __deprecated 20 #define __deprecated 21 #endif 22 23 #define fallthrough /* FALLTHROUGH */ do { } while(0) 24 25 #undef __always_inline 26 #define __always_inline inline 27 28 #define __printf(a,b) __printflike(a,b) 29 30 #define __malloc 31 32 #define noinline __noinline 33 34 #if __has_attribute(__nonstring__) 35 #define __nonstring __attribute__((__nonstring__)) 36 #else 37 #define __nonstring 38 #endif 39 40 #define noinline_for_stack __noinline 41 42 #define __maybe_unused __unused 43 #define __always_unused __unused 44 45 #define __must_check __result_use_check 46 47 #define __weak __weak_symbol 48 49 #endif 50