Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sched/clock: cleanup g_system_ticks reference if arch timer is enabled #15151

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sched/clock/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
16 changes: 8 additions & 8 deletions sched/clock/clock_initialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -393,7 +392,8 @@ void clock_resynchronize(FAR struct timespec *rtc_diff)
*
****************************************************************************/

#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 */
Expand Down
Loading