aboutsummaryrefslogtreecommitdiff
path: root/daemon/Config.h
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/Config.h')
-rw-r--r--daemon/Config.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/daemon/Config.h b/daemon/Config.h
index 6f5e2aa..bee383a 100644
--- a/daemon/Config.h
+++ b/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