mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
tools: Adopt __aligned from kernel sources
To have a more compact way to ask the compiler to use a specific alignment, making tools/ look more like kernel source 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-8jiem6ubg9rlpbs7c2p900no@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
c9f5da742f
commit
5c97cac63a
2 changed files with 3 additions and 1 deletions
|
@ -26,5 +26,6 @@
|
||||||
|
|
||||||
#define __noreturn __attribute__((noreturn))
|
#define __noreturn __attribute__((noreturn))
|
||||||
|
|
||||||
|
#define __aligned(x) __attribute__((aligned(x)))
|
||||||
#define __printf(a, b) __attribute__((format(printf, a, b)))
|
#define __printf(a, b) __attribute__((format(printf, a, b)))
|
||||||
#define __scanf(a, b) __attribute__((format(scanf, a, b)))
|
#define __scanf(a, b) __attribute__((format(scanf, a, b)))
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef __PERF_EVLIST_H
|
#ifndef __PERF_EVLIST_H
|
||||||
#define __PERF_EVLIST_H 1
|
#define __PERF_EVLIST_H 1
|
||||||
|
|
||||||
|
#include <linux/compiler.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/refcount.h>
|
#include <linux/refcount.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
|
@ -34,7 +35,7 @@ struct perf_mmap {
|
||||||
refcount_t refcnt;
|
refcount_t refcnt;
|
||||||
u64 prev;
|
u64 prev;
|
||||||
struct auxtrace_mmap auxtrace_mmap;
|
struct auxtrace_mmap auxtrace_mmap;
|
||||||
char event_copy[PERF_SAMPLE_MAX_SIZE] __attribute__((aligned(8)));
|
char event_copy[PERF_SAMPLE_MAX_SIZE] __aligned(8);
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue