On 22/03/2021 16:56, Jan Sommer wrote:
diff --git a/bsps/riscv/riscv/clock/clockdrv.c 
b/bsps/riscv/riscv/clock/clockdrv.c
index d085b6bd95..e8a39c8591 100644
--- a/bsps/riscv/riscv/clock/clockdrv.c
+++ b/bsps/riscv/riscv/clock/clockdrv.c
@@ -41,6 +41,7 @@
  #include <rtems/timecounter.h>
  #include <rtems/score/cpuimpl.h>
  #include <rtems/score/riscv-utility.h>
+#include <rtems/score/smpimpl.h>
#include <libfdt.h> @@ -92,13 +93,18 @@ static void riscv_clock_at_tick(riscv_timecounter *tc)
  {
    volatile RISCV_CLINT_regs *clint;
    uint64_t value;
+  uint32_t cpu = 0;
+
+#if defined(RTEMS_SMP)
+  cpu = _CPU_SMP_Get_current_processor();
+#endif
You can use rtems_scheduler_get_processor() to get rid of this include of an implementation header and the #if.

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to