加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
compiler.h 828 Bytes
一键复制 编辑 原始数据 按行查看 历史
Jian ZHANG 提交于 2023-03-18 12:35 . enable poweroff from psci
/* SPDX-License-Identifier: GPL-2.0 */
/* Partial copy from linux/include/linux/compiler_attributes.h */
#ifndef __COMPILER_H
#define __COMPILER_H
/*
* Note: users of __always_inline currently do not write "inline" themselves,
* which seems to be required by gcc to apply the attribute according
* to its docs (and also "warning: always_inline function might not be
* inlinable [-Wattributes]" is emitted).
*
* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-always_005finline-function-attribute
* clang: mentioned
*/
#define __always_inline inline __attribute__((__always_inline__))
#ifdef __cplusplus
#define CPP_ASMLINKAGE extern "C"
#else
#define CPP_ASMLINKAGE
#endif
#ifndef asmlinkage
#define asmlinkage CPP_ASMLINKAGE
#endif
#endif /* #ifndef __COMPILER_H */
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化