hujun260 commented on code in PR #16673: URL: https://github.com/apache/nuttx/pull/16673#discussion_r2227766487
########## sched/sched/sched_unlock.c: ########## @@ -69,10 +69,12 @@ void sched_unlock(void) * then pre-emption has been re-enabled. */ - if (rtcb != NULL && --rtcb->lockcount == 0) Review Comment: Have you encountered any specific issues? The current logic is based on the Linux implementation, where scheduler disabling and scheduler checks are decoupled. Your modification in this way is equivalent to coupling scheduler disabling with scheduler checks, and additionally extending the time for scheduler disabled. Moreover, this critical section does not necessarily have to be called and can be optimized 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org