diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-08-26 19:29:56 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-08-27 10:44:53 +0200 |
commit | 27bfb7628c709eb6802c9ec73a6feb995fda8375 (patch) | |
tree | b449e5d364805f293c4329b066182ea338f49f6f /src/pulsecore | |
parent | 59070892ed070d0c42d8d9b91d267a39c5763a9c (diff) |
macro: add macro to align variables
Diffstat (limited to 'src/pulsecore')
-rw-r--r-- | src/pulsecore/macro.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h index 87684ad3..bffcc264 100644 --- a/src/pulsecore/macro.h +++ b/src/pulsecore/macro.h @@ -80,6 +80,12 @@ static inline size_t PA_PAGE_ALIGN(size_t l) { #define PA_ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0])) +#if defined(__GNUC__) + #define PA_DECLARE_ALIGNED(n,t,v) t v __attribute__ ((aligned (n))) +#else + #define PA_DECLARE_ALIGNED(n,t,v) t v +#endif + /* The users of PA_MIN and PA_MAX, PA_CLAMP, PA_ROUND_UP should be * aware that these macros on non-GCC executed code with side effects * twice. It is thus considered misuse to use code with side effects |