From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- tools/gator/daemon/Config.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tools/gator/daemon/Config.h (limited to 'tools/gator/daemon/Config.h') diff --git a/tools/gator/daemon/Config.h b/tools/gator/daemon/Config.h new file mode 100644 index 00000000..bee383a1 --- /dev/null +++ b/tools/gator/daemon/Config.h @@ -0,0 +1,28 @@ +/** + * Copyright (C) ARM Limited 2010-2014. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef CONFIG_H +#define CONFIG_H + +#define ARRAY_LENGTH(A) static_cast(sizeof(A)/sizeof((A)[0])) +#define ACCESS_ONCE(x) (*(volatile typeof(x)*)&(x)) + +#define MAX_PERFORMANCE_COUNTERS 50 +#define NR_CPUS 32 + +template +static inline T min(const T a, const T b) { + return (a < b ? a : b); +} + +template +static inline T max(const T a, const T b) { + return (a > b ? a : b); +} + +#endif // CONFIG_H -- cgit v1.3.1