This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 4cb15ecd87c4dc09f6de661e16dffdfd71351f98
Author: ouyangxiangzhen <[email protected]>
AuthorDate: Tue Nov 24 10:07:29 2026 +0800

    spinlock: fix the max nesting depth comment
    
    The rspinlock nesting comment said the lock can be nested UINT8_MAX
    deep while the assert and the count field allow up to UINT16_MAX.
    Align the comment with the actual limit.
    
    Assisted-By: mimo-v2.6-pro
    Signed-off-by: ouyangxiangzhen <[email protected]>
---
 include/nuttx/spinlock.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h
index b6825319c85..b0a5ce87a56 100644
--- a/include/nuttx/spinlock.h
+++ b/include/nuttx/spinlock.h
@@ -680,7 +680,7 @@ uint16_t rspin_lock_count(FAR volatile rspinlock_t *lock)
  * Name: rspin_lock_irqsave/rspin_lock_irqsave_nopreempt
  *
  * Description:
- *   Nest supported spinlock, can support UINT8_MAX max depth.
+ *   Nest supported spinlock, can support UINT16_MAX max depth.
  *   As we should not disable irq for long time, sched also locked.
  *   Similar feature with enter_critical_section, but isolate by instance.
  *
@@ -1090,7 +1090,7 @@ void spin_unlock_irqrestore_nopreempt(FAR volatile 
spinlock_t *lock,
  * Name: rspin_unlock_irqrestore/rspin_unlock_irqrestore_nopreempt
  *
  * Description:
- *   Nest supported spinunlock, can support UINT8_MAX max depth.
+ *   Nest supported spinunlock, can support UINT16_MAX max depth.
  *   Should work with rspin_lock_irqsave_nopreempt().
  *   Similar feature with leave_critical_section, but isolate by instance.
  *

Reply via email to