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


##########
sched/sched/sched_lock.c:
##########
@@ -46,6 +46,25 @@
  * Public Functions
  ****************************************************************************/
 
+/****************************************************************************
+ * Name:  sched_lock_wo_note
+ *
+ * Description:
+ *   This function disables context switching.
+ *   It does not perform instrumentation logic.
+ *
+ ****************************************************************************/
+
+void sched_lock_wo_note(void)
+{
+  FAR struct tcb_s *tcb = this_task();
+
+  if (tcb && !up_interrupt_context())

Review Comment:
   Sorry, I just thought that if `sched_lock()` is called in an interrupt, the 
context may not switch normally, right? if so please ignore my comments



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