anchao commented on code in PR #15324: URL: https://github.com/apache/nuttx/pull/15324#discussion_r1898484449
########## sched/clock/clock_systime_timespec.c: ########## @@ -62,21 +62,21 @@ int clock_systime_timespec(FAR struct timespec *ts) { #ifdef CONFIG_RTC_HIRES + irqstate_t flags; + + flags = spin_lock_irqsave(&g_basetime_lock); if (g_rtc_enabled) { - irqstate_t flags; - up_rtc_gettime(ts); Review Comment: So what's the point of removing the global lock? Make the code more complicated and make the performance worse?We are not robots. If it is just a simple replacement of the lock, why not let AI do it? Any changes need to think about how to make the code better. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org