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


##########
sched/sched/sched_lock.c:
##########
@@ -46,6 +46,29 @@
  * 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 *rtcb;
+
+  if (!up_interrupt_context())
+    {
+      rtcb = this_task();
+      if (rtcb != NULL)
+        {
+          rtcb->lockcount++;

Review Comment:
   no racecondition here



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