summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio G. Cota2016-06-08 20:55:19 +0200
committerRichard Henderson2016-06-12 00:59:33 +0200
commit911a4d2215b05267b16925503218f49d607c6b29 (patch)
tree1e63d359e498051a54dd77a0e9084059519ae6d1
parentMerge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160610-1' into st... (diff)
downloadqemu-911a4d2215b05267b16925503218f49d607c6b29.tar.gz
qemu-911a4d2215b05267b16925503218f49d607c6b29.tar.xz
qemu-911a4d2215b05267b16925503218f49d607c6b29.zip
compiler.h: add QEMU_ALIGNED() to enforce struct alignment
Reviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Emilio G. Cota <cota@braap.org> Message-Id: <1465412133-3029-2-git-send-email-cota@braap.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
-rw-r--r--include/qemu/compiler.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 8f1cc7ba67..b64f899870 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -41,6 +41,8 @@
# define QEMU_PACKED __attribute__((packed))
#endif
+#define QEMU_ALIGNED(X) __attribute__((aligned(X)))
+
#ifndef glue
#define xglue(x, y) x ## y
#define glue(x, y) xglue(x, y)