sched/clock: Avoid duplicate adjtime implementation.

CLOCK_TIMEKEEPING already provides a software-based adjtime implementation. Exclude the generic adjtime state and entry point when timekeeping is enabled, while retaining clock_adjtime support for PTP clocks.

Assisted-by: OpenAI Codex
Signed-off-by: yushuailong <yyyusl@qq.com>
This commit is contained in:
yushuailong
2026-09-13 11:12:56 +08:00
committed by Xiang Xiao
parent d81a3a4d07
commit 5db3aa9e93
+4
View File
@@ -50,6 +50,9 @@
* Private Data
****************************************************************************/
/* CLOCK_TIMEKEEPING provides its own software-based adjtime(). */
#ifndef CONFIG_CLOCK_TIMEKEEPING
static struct wdog_s g_adjtime_wdog;
static long g_adjtime_ppb;
static spinlock_t g_adjtime_lock = SP_UNLOCKED;
@@ -216,6 +219,7 @@ int adjtime(FAR const struct timeval *delta, FAR struct timeval *olddelta)
return OK;
}
}
#endif /* !CONFIG_CLOCK_TIMEKEEPING */
/****************************************************************************
* Name: nxclock_adjtime