Fix-Point opened a new pull request, #22471: URL: https://github.com/apache/nuttx/pull/22471
## Summary This PR brings arch/ceva's task exit path in line with the NuttX architecture interface and other architectures: - `arch/ceva: rename _exit to up_exit to match arch interface` CEVA implemented `_exit()` instead of `up_exit()`. The arch-layer interface declared in `include/nuttx/arch.h` is `up_exit(int status)` (with `noreturn_function`), and `sched/task/exit.c` calls `up_exit(status)` on every architecture. CEVA was the only architecture still defining the POSIX libc name `_exit`. - `arch/ceva: remove redundant scheduler calls in _exit` `nxtask_exit()` already calls `nxsched_suspend_scheduler()` for the exiting task, so the explicit `sched_suspend_scheduler(tcb)` before it is redundant. The `sched_resume_scheduler(tcb)` after the switch is also unnecessary: `nxsched_remove_self()` activates the idle task via `nxsched_switch_running()`, and the new task's resume is handled by `nxsched_switch()` in the context-switch path, same as RISC-V's `up_exit()`. Both calls are removed to match the other architectures. ## Impact - Only `arch/ceva/src/common/ceva_exit.c` is touched. - The `g_running_tasks[this_cpu()] = tcb` assignment is kept in the CEVA per-CPU form. ## Testing **Important**: we did not compile or run CEVA. No CEVA board configuration exists in tree and no CEVA toolchain was available, so these changes were not build- or runtime-verified on CEVA itself. The conclusions are drawn from program analysis only: - The rename is required for the CEVA build to link at all: `sched/task/exit.c` calls `up_exit(status)` unconditionally, and CEVA defined `_exit()` but never `up_exit()`, so any CEVA link must have failed with an undefined `up_exit` symbol. Similarly, the `_exit` symbol CEVA defined was never referenced by the scheduler. - The scheduler-call removal follows from `nxtask_exit()` internally calling `nxsched_suspend_scheduler()` (the explicit call duplicates it), and from the context-switch path already resuming the next task (the explicit `sched_resume_scheduler()` duplicates RISC-V's pattern). checkpatch passes on both commits. -- 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]
