mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
tools: Adopt noinline from kernel sources
To have a more compact way to ask the compiler not to inline a function and to make tools/ source code look like kernel code. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-bis4pqxegt6gbm5dlqs937tn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
0353631aa7
commit
9dd4ca470e
5 changed files with 13 additions and 14 deletions
|
@ -20,6 +20,8 @@
|
|||
/* &a[0] degrades to a pointer: a different type from an array */
|
||||
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
|
||||
|
||||
#define noinline __attribute__((noinline))
|
||||
|
||||
#define __noreturn __attribute__((noreturn))
|
||||
|
||||
#define __printf(a, b) __attribute__((format(printf, a, b)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue