diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-09-25 10:58:00 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-09-25 10:58:17 +0200 |
commit | 5f2d63683a773b37cbfb383513dfe50d07d97425 (patch) | |
tree | 470bdd580db4885f91672f308787ba7c50a8e5eb /rtemsbsd | |
parent | Fix warnings (diff) | |
download | rtems-libbsd-5f2d63683a773b37cbfb383513dfe50d07d97425.tar.bz2 |
Add support for EARLY_COUNTER
Diffstat (limited to 'rtemsbsd')
-rw-r--r-- | rtemsbsd/include/machine/counter.h | 10 |
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 |