mirror of
https://github.com/apache/nuttx.git
synced 2026-09-26 01:46:57 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user