diff options
Diffstat (limited to 'src/cyclictest/rt_numa.h')
-rw-r--r-- | src/cyclictest/rt_numa.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/cyclictest/rt_numa.h b/src/cyclictest/rt_numa.h index 06c9420..c1b3f94 100644 --- a/src/cyclictest/rt_numa.h +++ b/src/cyclictest/rt_numa.h @@ -192,6 +192,12 @@ static inline void rt_bitmask_free(struct bitmask *mask) #endif /* LIBNUMA_API_VERSION */ +static void numa_on_and_available() +{ + if (numa && (numa_available() == -1)) + fatal("--numa specified and numa functions not available.\n"); +} + #else /* ! NUMA */ struct bitmask { @@ -249,17 +255,19 @@ static inline void rt_bitmask_free(struct bitmask *mask) free(mask); } -#endif /* NUMA */ -/* - * Any behavioral differences above are transparent to these functions - */ static void numa_on_and_available() { - if (numa && (numa_available() == -1)) + if (numa) /* NUMA is not defined here */ fatal("--numa specified and numa functions not available.\n"); } +#endif /* NUMA */ + +/* + * Any behavioral differences above are transparent to these functions + */ + /** Returns number of bits set in mask. */ static inline unsigned int rt_numa_bitmask_count(const struct bitmask *mask) { |