You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ar...@apache.org on 2025/11/11 10:36:46 UTC
(nuttx) branch revert-17300-apache_6 updated (f2730b0b01d -> ed1367b6cfa)
This is an automated email from the ASF dual-hosted git repository.
archer pushed a change to branch revert-17300-apache_6
in repository https://gitbox.apache.org/repos/asf/nuttx.git
omit f2730b0b01d Revert "sched_lock: remove the check for whether tcb is NULL"
new ed1367b6cfa sched/sched_lock: remove null pointer check of rtcb
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (f2730b0b01d)
\
N -- N -- N refs/heads/revert-17300-apache_6 (ed1367b6cfa)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
sched/sched/sched_lock.c | 4 ++--
sched/sched/sched_unlock.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
(nuttx) 01/01: sched/sched_lock: remove null pointer check of rtcb
Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
archer pushed a commit to branch revert-17300-apache_6
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit ed1367b6cfa4080cb4f2a3eae8231da70fdb3cb5
Author: chao an <an...@bytedance.com>
AuthorDate: Tue Nov 11 18:31:37 2025 +0800
sched/sched_lock: remove null pointer check of rtcb
In previous commits to xiaomi, runtime null pointer checks for RTCB were removed.
This could cause `sched_lock/unlock` exceptions when `DEBUG_ASSERTIONS` was disabled.
In this commit, we removed all RTCB checks to improve performance by 1 comparison cycle
| commit d94cb53d6cde6a999d862ae45e1fcd3692675cb4 (HEAD, origin/master, origin/HEAD)
| Author: hujun5 <hu...@xiaomi.com>
| Date: Thu Feb 6 15:06:00 2025 +0800
|
| sched_lock: remove the check for whether tcb is NULL
|
| Remove Redundant Checks
|
| Signed-off-by: hujun5 <hu...@xiaomi.com>
Signed-off-by: chao an <an...@bytedance.com>
---
sched/sched/sched_lock.c | 2 +-
sched/sched/sched_unlock.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sched/sched/sched_lock.c b/sched/sched/sched_lock.c
index 97ae1e90712..10a855ffbea 100644
--- a/sched/sched/sched_lock.c
+++ b/sched/sched/sched_lock.c
@@ -76,7 +76,7 @@ void sched_lock(void)
* integer type.
*/
- DEBUGASSERT(rtcb && rtcb->lockcount < MAX_LOCK_COUNT);
+ DEBUGASSERT(rtcb->lockcount < MAX_LOCK_COUNT);
/* A counter is used to support locking. This allows nested lock
* operations on this thread (on any CPU)
diff --git a/sched/sched/sched_unlock.c b/sched/sched/sched_unlock.c
index da75abe6bf1..23bb3727124 100644
--- a/sched/sched/sched_unlock.c
+++ b/sched/sched/sched_unlock.c
@@ -64,7 +64,7 @@ void sched_unlock(void)
/* rtcb may be NULL only during early boot-up phases */
- DEBUGASSERT(rtcb && rtcb->lockcount > 0);
+ DEBUGASSERT(rtcb->lockcount > 0);
/* Check if the lock counter has decremented to zero. If so,
* then pre-emption has been re-enabled.