1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fix IS_ALIGNED macro

The old macro lead to failures on the tester, even though the alignment
actually was correct.
This commit is contained in:
Georg Reinke 2017-03-28 13:26:15 +02:00
parent ccdb41d9d2
commit de1a9b4ab3

View file

@ -51,7 +51,7 @@
#define ALIGN(x, a) ALIGN_MASK(x, (uintptr_t) (a) - 1)
#define ALIGN_MASK(x, m) (((uintptr_t) (x) + (m)) & ~(m))
#define IS_ALIGNED(x, a) (ALIGN(x, a) == (uintptr_t) x)
#define IS_ALIGNED(x, a) ((uintptr_t) (x) % (uintptr_t) (a) == 0)
/** Round-up integer division */
#define CEIL(x, y) (((x) + (y) - 1) / (y))
@ -228,4 +228,4 @@ static inline int log2i(long long x) {
/** Sleep with rdtsc */
void rdtsc_sleep(uint64_t nanosecs, uint64_t start);
#endif /* _UTILS_H_ */
#endif /* _UTILS_H_ */