This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new cafdcb1eb0 sched/clock: cleanup g_system_ticks reference if arch timer 
is enabled
cafdcb1eb0 is described below

commit cafdcb1eb0abc6de6c3f1e3bb962934782370456
Author: chao an <[email protected]>
AuthorDate: Thu Dec 12 15:09:21 2024 +0800

    sched/clock: cleanup g_system_ticks reference if arch timer is enabled
    
    continue work of: https://github.com/apache/nuttx/pull/15139
    
    Signed-off-by: chao an <[email protected]>
---
 sched/clock/clock.h            |  3 ++-
 sched/clock/clock_initialize.c | 16 ++++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/sched/clock/clock.h b/sched/clock/clock.h
index 507adac347..8c676ec41a 100644
--- a/sched/clock/clock.h
+++ b/sched/clock/clock.h
@@ -75,7 +75,8 @@ extern struct timespec  g_basetime;
 int  clock_basetime(FAR struct timespec *tp);
 
 void clock_initialize(void);
-#ifndef CONFIG_SCHED_TICKLESS
+#if !defined(CONFIG_SCHED_TICKLESS) && \
+    !defined(CONFIG_ALARM_ARCH) && !defined(CONFIG_TIMER_ARCH)
 void clock_timer(void);
 #else
 #  define clock_timer()
diff --git a/sched/clock/clock_initialize.c b/sched/clock/clock_initialize.c
index 079af0c10c..19cf8e0170 100644
--- a/sched/clock/clock_initialize.c
+++ b/sched/clock/clock_initialize.c
@@ -49,12 +49,9 @@
  * Public Data
  ****************************************************************************/
 
-#ifndef CONFIG_SCHED_TICKLESS
-#ifdef CONFIG_SYSTEM_TIME64
-volatile uint64_t g_system_ticks = INITIAL_SYSTEM_TIMER_TICKS;
-#else
-volatile uint32_t g_system_ticks = INITIAL_SYSTEM_TIMER_TICKS;
-#endif
+#if !defined(CONFIG_SCHED_TICKLESS) && \
+    !defined(CONFIG_ALARM_ARCH) && !defined(CONFIG_TIMER_ARCH)
+volatile clock_t g_system_ticks = INITIAL_SYSTEM_TIMER_TICKS;
 #endif
 
 #ifndef CONFIG_CLOCK_TIMEKEEPING
@@ -305,7 +302,9 @@ void clock_synchronize(FAR const struct timespec *tp)
  *
  ****************************************************************************/
 
-#if defined(CONFIG_RTC) && !defined(CONFIG_SCHED_TICKLESS) && 
!defined(CONFIG_CLOCK_TIMEKEEPING)
+#if defined(CONFIG_RTC) && !defined(CONFIG_SCHED_TICKLESS) && \
+    !defined(CONFIG_CLOCK_TIMEKEEPING) && !defined(CONFIG_ALARM_ARCH) && \
+    !defined(CONFIG_TIMER_ARCH)
 void clock_resynchronize(FAR struct timespec *rtc_diff)
 {
   struct timespec rtc_time;
@@ -393,7 +392,8 @@ skip:
  *
  ****************************************************************************/
 
-#ifndef CONFIG_SCHED_TICKLESS
+#if !defined(CONFIG_SCHED_TICKLESS) && \
+    !defined(CONFIG_ALARM_ARCH) && !defined(CONFIG_TIMER_ARCH)
 void clock_timer(void)
 {
   /* Increment the per-tick system counter */

Reply via email to