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


##########
sched/sched/sched_unlock.c:
##########
@@ -37,281 +37,178 @@
 #include "sched/sched.h"
 
 /****************************************************************************
- * Public Functions
+ * Private Data
  ****************************************************************************/
 
+#if defined(CONFIG_SCHED_TICKLESS) && \
+           (CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC))
+static int preempt_schedule_nestcount = 0;

Review Comment:
   ok, how about decrease lockcount after call `sched_preemt_schedule()`, This 
will ensure that the unlock operation is not recursively processed in context 
switch flow.
   
![image](https://github.com/user-attachments/assets/ef5f55c2-64ca-4232-9d34-e8fc60b1e0ef)
   



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

Reply via email to