You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "fxysunshine (via GitHub)" <gi...@apache.org> on 2026/01/19 12:15:08 UTC
[PR] MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
fxysunshine opened a new pull request, #18016:
URL: https://github.com/apache/nuttx/pull/18016
### Summary
This PR addresses a small set of MISRA C:2012 and Coverity findings across NuttX core code.
The changes are focused on type-safety, initialization, and simplifying return paths without altering intended behavior.
Key updates:
- Fix MISRA Rule 10.4 by using the proper enum type for `g_nx_initstate`.
- Fix MISRA Rule 10.3 in ARMv8-R IRQ helpers by using unsigned constants (`1u`, `~1u`) for bit operations.
- Fix a Coverity uninitialized-field report by zero-initializing `posix_spawnattr_t` in `posix_spawnattr_init()`.
- Refactor several scheduler/task helpers to use a single return path (Coverity “RETURN” metric), improving readability and reducing early returns.
### Impact
- **Functional impact:** No intended functional change; these are compliance/quality fixes (type correctness, initialization, control-flow cleanup).
- **Affected areas:**
- Scheduler/task utilities (`sched/task/*`)
- System init state (`include/nuttx/init.h`, `sched/init/nx_start.c`)
- libc spawn attributes (`libs/libc/spawn/lib_psa_init.c`)
- ARMv8-R IRQ helpers (`arch/arm/include/armv8-r/irq.h`)
- **Risk:** Low. Changes are localized and primarily mechanical (types, constants, return-path refactors).
### Testing
- **Environment:**
- Host: Linux
- Build system: CMake
- Configurations:
- sim:nsh and qemu-armv7a:nsh
- **Steps:**
1. Configure and build sim:nsh (CMake):
- ./tools/configure.sh -c sim:nsh
- cmake -B build -S .
- cmake --build build -j
2. Configure and build qemu-armv7a:nsh (CMake):
- ./tools/configure.sh -c qemu-armv7a:nsh
- cmake -B build -S .
- cmake --build build -j
3. Boot and run NSH smoke checks:
- Run help
- Run ps ...
- **Results:**
- MISRA/Coverity: PASS (no new issues introduced; targeted findings addressed)
- sim:nsh (CMake): PASS (build + NSH smoke)
- qemu-armv7a:nsh (CMake): PASS (build + NSH smoke)
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2706539168
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
to pass ASIL-D certification, the code need follow some critical MISRA-C rule. @acassis do you want the core part of nuttx get certificated?
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "fxysunshine (via GitHub)" <gi...@apache.org>.
fxysunshine commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2706645559
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
<img width="1055" height="695" alt="image" src="https://github.com/user-attachments/assets/57a9fdaf-50eb-47dd-bbfb-4d7cbd4c3bf1" />
@anchao, for the purpose of obtaining ASIL-D functional safety certification, we shall comply with the design principles for software unit design and implementation specified in ISO 26262-6:2018. Among these requirements, the rule of one entry and one exit point for subprograms and functions shall be implemented by adopting MISRA C:2012 Rule 15.5 as the coding standard.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2706571843
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
<img width="1550" height="1016" alt="image" src="https://github.com/user-attachments/assets/b207250e-8b13-41f1-829f-76d0534d86d4" />
Category is advisory, right? This won’t impact the ASIL-D certification at all. Don’t try to brand me with such an accusation.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sched/task: MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2709161112
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
<img width="1669" height="946" alt="image" src="https://github.com/user-attachments/assets/54fb7403-85b5-437c-8ebb-c64ad24c4bed" />
A milestone for Zephyr is that mailbox.c has been included in the certification list. Some details have not yet been disclosed, but several chip companies have obtained ASIL-D certification based on Zephyr.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2706689570
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
<img width="1020" height="1578" alt="image" src="https://github.com/user-attachments/assets/0ccd4c79-0096-42e9-9df9-6778f947b51d" />
https://github.com/zephyrproject-rtos/zephyr/blob/main/kernel/mailbox.c#L382-L439
Zephyr has obtained ASIL-D certification.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sched/task: MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "fxysunshine (via GitHub)" <gi...@apache.org>.
fxysunshine commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2710795570
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
https://www.inovex.de/wp-content/uploads/FOSS-Safety-Zephyr-Meetup-Hamburg-2024-10-17.pdf
1. the document have the same description the same with picture that is posted.
2. The open-source version of Zephyr has not yet obtained certifications such as IEC 61508 SIL 3 or ISO 26262 ASIL-D. Zephyr is actively advancing certification efforts. And IEC 61508 SIL 3 is the initial core certification target. But for 26262 ASIL-D, no substantive progress has been made yet, it depends on community demand and resource investment to launch. and additional efforts from chip vendors may also be required to obtain this certification.
3. Zephyr’s goal to "become a certified open-source RTOS against IEC 61508 SIL 3 (SEooC)" and makes no reference to any completed certifications, underscoring that the certification process remains ongoing.
@xiaoxiang781216 @acassis @jerpelea @anchao , We have essentially completed ASIL-D safety for the NuttX core kernel. Do you think we should push this work into the community?
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sched/task: MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2710970949
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
Formal verification is completely unsuitable for software development workflows. These constraints were only documented because early compilers were riddled with bugs. I wonder if you have encountered a lot of odd issues while using the Green Hills compiler—they can’t even handle switch prediction properly. So why are we still trusting these obsolete tools?
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sched/task: MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "fxysunshine (via GitHub)" <gi...@apache.org>.
fxysunshine commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2710764322
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
https://www.inovex.de/wp-content/uploads/FOSS-Safety-Zephyr-Meetup-Hamburg-2024-10-17.pdf
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
https://www.inovex.de/wp-content/uploads/FOSS-Safety-Zephyr-Meetup-Hamburg-2024-10-17.pdf
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sched/task: MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2711087783
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
> 1. I don’t think that obtaining ASIL-D certification or adopting AUTOSAR guarantees safety; it is merely a threshold set by leading enterprises.
No,
> 2. Certified companies have not disclosed the kernel they use, but I know it is Zephyr.
so, why do you reference the official Zephry code base and said that "the rule of one entry and one exit point for subprograms and functions" isn't required?
> 3. To pass ASIL-D certification, the nuttx kernel requires extensive modifications.
yes, we are modifying sched/ and make the change pass the certification and production testing.
> Some changes, such as those related to dynamic memory management, may not cover all scenarios.
one time dynmaic allocation is fine. we add assert in free and testing the cerification kernel never call free in anycase.
> Formal verification is completely unsuitable for software development workflows. These constraints were only documented because early compilers were riddled with bugs. I wonder if you have encountered a lot of odd issues while using the Green Hills compiler—they can’t even handle switch prediction properly. So why are we still trusting these obsolete tools?
we use other safety compiler for certification. Anyway, let's come back to this patch, do you have any other concern?
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sched/task: MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2710803735
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
> A milestone for Zephyr is that mailbox.c has been included in the certification list. Some details have not yet been disclosed, but several chip companies have obtained ASIL-D certification based on Zephyr.
@anchao but I don't see any safety related change on zephyr main branch, are you sure Zephry pass the certification with:
https://github.com/zephyrproject-rtos/zephyr/blob/main/kernel/mailbox.c#L382-L439
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "fxysunshine (via GitHub)" <gi...@apache.org>.
fxysunshine commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2706711227
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
OK. Need investigate the scope of Zephyr's ASIL-D certification. Mailbox is part of the multithreaded communication module and can be configurable?
@anchao Can you give some information about Zephyr's ASIL-D certification?
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2706836858
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
> Zephyr has obtained ASIL-D certification.
@anchao where do you get this confirmation? From the official website:
https://github.com/zephyrproject-rtos/zephyr/wiki/Safety-FAQ
Zephry doesn't pass any certification yet.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sched/task: MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #18016:
URL: https://github.com/apache/nuttx/pull/18016
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "fxysunshine (via GitHub)" <gi...@apache.org>.
fxysunshine commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2706711227
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
OK. Need investigate the scope of Zephyr's ASIL-D certification. Mailbox is part of the multithreaded communication module and can be configurable?
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2706339523
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
I don't think this type of MISRA rule is valuable for the project; the code becomes very difficult to read after the modifications.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "fxysunshine (via GitHub)" <gi...@apache.org>.
fxysunshine commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2706711227
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
OK. Need investigate the scope of Zephyr's ASIL-D certification. Mailbox is part of the multithreaded communication module and can be configurable.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sched/task: MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "fxysunshine (via GitHub)" <gi...@apache.org>.
fxysunshine commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2710795570
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
https://www.inovex.de/wp-content/uploads/FOSS-Safety-Zephyr-Meetup-Hamburg-2024-10-17.pdf
1. the document have the same description the same with picture that is posted.
2. The open-source version of Zephyr has not yet obtained certifications such as IEC 61508 SIL 3 or ISO 26262 ASIL-D. Zephyr is actively advancing certification efforts. And IEC 61508 SIL 3 is the initial core certification target. But for 26262 ASIL-D, no substantive progress has been made yet, it depends on community demand and resource investment to launch. and additional efforts from chip vendors may also be required to obtain this certification.
3. Zephyr’s goal to "become a certified open-source RTOS against IEC 61508 SIL 3 (SEooC)" and makes no reference to any completed certifications, underscoring that the certification process remains ongoing.
@xiaoxiang781216 @acassis @jerpelea @anchao , We have essentially completed ASIL-D safety for the NuttX core kernel and close to pass the certification body's review. Do you think we should push this work into the community?
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sched/task: MISRA/Coverity cleanups in scheduler, init, libc spawn, and ARMv8-R IRQ helpers [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #18016:
URL: https://github.com/apache/nuttx/pull/18016#discussion_r2710963355
##########
sched/task/task_cancelpt.c:
##########
@@ -125,14 +125,13 @@ bool nxnotify_cancellation(FAR struct tcb_s *tcb)
*/
tls->tl_cpstate |= CANCEL_FLAG_CANCEL_PENDING;
- leave_critical_section(flags);
- return true;
+ ret = true;
Review Comment:
1. I don’t think that obtaining ASIL-D certification or adopting AUTOSAR guarantees safety; it is merely a threshold set by leading enterprises.
2. Certified companies have not disclosed the kernel they use, but I know it is Zephyr.
3. To pass ASIL-D certification, the nuttx kernel requires extensive modifications. Some changes, such as those related to dynamic memory management, may not cover all scenarios.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org