summaryrefslogtreecommitdiffstats
path: root/rtemsbsd
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-09-25 10:58:00 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-09-25 10:59:50 +0200
commitb5f802ef431b78f6b0474bd1234a9a9e9b8b7fd6 (patch)
tree66e0092090913cbb61ac9ae5559fa56c3a8d4870 /rtemsbsd
parentFix warnings (diff)
downloadrtems-libbsd-b5f802ef431b78f6b0474bd1234a9a9e9b8b7fd6.tar.bz2
Add support for EARLY_COUNTER
Diffstat (limited to 'rtemsbsd')
-rw-r--r--rtemsbsd/include/machine/counter.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/rtemsbsd/include/machine/counter.h b/rtemsbsd/include/machine/counter.h
index 4c25d610..1705e393 100644
--- a/rtemsbsd/include/machine/counter.h
+++ b/rtemsbsd/include/machine/counter.h
@@ -36,6 +36,16 @@
#include <rtems/score/isrlevel.h>
+#ifdef RTEMS_SMP
+#define _BSD_EARLY_COUNTER_SIZE (CPU_MAXIMUM_PROCESSORS * UMA_PCPU_ALLOC_SIZE)
+#else
+#define _BSD_EARLY_COUNTER_SIZE 1
+#endif
+
+extern uint64_t _bsd_early_counter[_BSD_EARLY_COUNTER_SIZE];
+
+#define EARLY_COUNTER (&_bsd_early_counter[0])
+
#ifdef IN_SUBR_COUNTER_C
static inline uint64_t