anchao commented on code in PR #15136:
URL: https://github.com/apache/nuttx/pull/15136#discussion_r1880287821


##########
sched/clock/clock_timekeeping.c:
##########
@@ -72,7 +73,7 @@ static int clock_get_current_time(FAR struct timespec *ts,
   time_t sec;
   int ret;
 
-  flags = enter_critical_section();
+  flags = spin_lock_irqsave(&g_clock_lock);
 
   ret = up_timer_gettick(&counter);

Review Comment:
   The key issue is that the scope of impact of your code before and after 
modification is different. You cannot guarantee that the modification will not 
bring side effects within the visible range. If you insist on making changes, 
please ignore my comments,I will not spend time reviewing similar submissions 
in the future.



-- 
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