hujun260 commented on code in PR #15324:
URL: https://github.com/apache/nuttx/pull/15324#discussion_r1898509625


##########
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:
   The entire replacement process needs to be carried out step by step. We can 
quickly submit a patch to replace the critical sections in the up_rtc_gettime 
driver as well.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to