casaroli opened a new pull request, #21559:
URL: https://github.com/apache/nuttx/pull/21559

   ## Summary
   
   `sched/signal/sig_default.c` does not build for two configurations:
   
   - `CONFIG_SIG_SIGURG_ACTION` without `CONFIG_SIG_SIGSTOP_ACTION`: the SIGURG 
entry of `g_defactions[]` uses `nxsig_null_action()`, but `nxsig_null_action()` 
is declared and defined only with `CONFIG_SIG_SIGSTOP_ACTION` 
(`'nxsig_null_action' undeclared`).
   - `CONFIG_SIG_SIGPROF_ACTION` as the only abnormal-termination action: the 
SIGPROF entry uses `nxsig_abnormal_termination()`, but 
`HAVE_NXSIG_ABNORMAL_TERMINANTION` does not include `CONFIG_SIG_SIGPROF_ACTION` 
(`'nxsig_abnormal_termination' undeclared`).
   
   This PR adds `HAVE_NXSIG_NULL_ACTION` (SIGSTOP or SIGURG action) for 
`nxsig_null_action()` and adds `CONFIG_SIG_SIGPROF_ACTION` to 
`HAVE_NXSIG_ABNORMAL_TERMINANTION`.
   
   ## Impact
   
   Build fix only. The configurations that built before get the same code. No 
API change. No documentation change: 
Documentation/reference/user/07_signals.rst already lists these options 
correctly.
   
   ## Testing
   
   Configuration A: `SIG_DEFAULT`, `SIG_SIGURG_ACTION`, no 
`SIG_SIGSTOP_ACTION`. Configuration B: `SIG_DEFAULT`, `SIG_SIGPROF_ACTION`, no 
`SIG_SIGKILL_ACTION`, no `SIG_SIGSTOP_ACTION`.
   
   | Build | master | this PR |
   |---|---|---|
   | qemu-armv8a:knsh (kernel build, arm64) + A | build error | builds; test 
program `sigurg.c` PASS (SIGURG reports `SIG_DFL`, `raise(SIGURG)` returns 0 
and the task goes on); ostest status 0 |
   | qemu-armv8a:nsh (flat build, arm64) + A, ostest | not run | ostest status 
0 |
   | qemu-armv8a:nsh + A, build only | build error | builds |
   | qemu-armv8a:nsh + B, build only | build error | builds |
   | rv-virt:nsh (flat build, riscv, xpack gcc 14.3) + A, build only | build 
error | builds |
   
   `tools/checkpatch.sh -c -u -m -g` passes.
   
   Not run: CMake builds, the protected build, other compilers than gcc. The 
code is plain preprocessor logic, so the result does not depend on the arch or 
the compiler.
   


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

Reply via email to