diff options
author | Sergey Fedorov <serge.fdrv@gmail.com> | 2016-04-22 19:08:43 +0300 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2016-05-12 14:06:40 -1000 |
commit | 18a60a76147569ca9e11b0607e50ce4012fe1aaa (patch) | |
tree | 4ba22fb284fa9ccc8ae84557ab69557718d25255 /include/qemu | |
parent | 89fee74a0f066dfd73830a7b5fa137e87888c870 (diff) | |
download | qemu-18a60a76147569ca9e11b0607e50ce4012fe1aaa.zip qemu-18a60a76147569ca9e11b0607e50ce4012fe1aaa.tar.gz qemu-18a60a76147569ca9e11b0607e50ce4012fe1aaa.tar.bz2 |
include/qemu/osdep.h: Add a macro to check for alignment
Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com>
Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org>
Message-Id: <1461341333-19646-2-git-send-email-sergey.fedorov@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/osdep.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 408783f..e3bc50b 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -158,6 +158,9 @@ extern int daemon(int, int); /* Round number up to multiple */ #define QEMU_ALIGN_UP(n, m) QEMU_ALIGN_DOWN((n) + (m) - 1, (m)) +/* Check if n is a multiple of m */ +#define QEMU_IS_ALIGNED(n, m) (((n) % (m)) == 0) + #ifndef ROUND_UP #define ROUND_UP(n,d) (((n) + (d) - 1) & -(d)) #endif |