diff options
Diffstat (limited to 'tools/gator/daemon/Config.h')
-rw-r--r-- | tools/gator/daemon/Config.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/gator/daemon/Config.h b/tools/gator/daemon/Config.h index 6f5e2aae50e1..bee383a1c797 100644 --- a/tools/gator/daemon/Config.h +++ b/tools/gator/daemon/Config.h @@ -10,8 +10,19 @@ #define CONFIG_H #define ARRAY_LENGTH(A) static_cast<int>(sizeof(A)/sizeof((A)[0])) +#define ACCESS_ONCE(x) (*(volatile typeof(x)*)&(x)) #define MAX_PERFORMANCE_COUNTERS 50 -#define NR_CPUS 16 +#define NR_CPUS 32 + +template<typename T> +static inline T min(const T a, const T b) { + return (a < b ? a : b); +} + +template<typename T> +static inline T max(const T a, const T b) { + return (a > b ? a : b); +} #endif // CONFIG_H |