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
The following commit(s) were added to refs/heads/master by this push:
new 7eb9bb0be6e cmake: Omit default priority ELF symbol.
7eb9bb0be6e is described below
commit 7eb9bb0be6e9a8d205a44ac54d1c9ebf2da38041
Author: Marco Casaroli <[email protected]>
AuthorDate: Mon Jul 27 03:49:01 2026 +0200
cmake: Omit default priority ELF symbol.
nuttx_add_application() encoded SCHED_PRIORITY_DEFAULT as a zero-valued
nx_priority linker symbol. A zero priority is invalid for a runnable ELF
application task.
Do not emit nx_priority for the symbolic default. When the symbol is
absent, the ELF loader retains its scheduler default. Continue emitting
nx_priority for explicit numeric priorities.
Companion to apache/nuttx-apps#3667.
Assisted-by: Zed:GPT-5.6 Terra
Signed-off-by: Marco Casaroli <[email protected]>
---
cmake/nuttx_add_application.cmake | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/cmake/nuttx_add_application.cmake
b/cmake/nuttx_add_application.cmake
index c670bf00d54..78c27c6e2a8 100644
--- a/cmake/nuttx_add_application.cmake
+++ b/cmake/nuttx_add_application.cmake
@@ -153,10 +153,7 @@ function(nuttx_add_application)
set(SYMBOL_STACKSIZE $<$<NOT:$<BOOL:${USE_LINKER}>>:-Wl,>--defsym
nx_stacksize=${STACKSIZE})
endif()
- if(PRIORITY)
- if(PRIORITY STREQUAL "SCHED_PRIORITY_DEFAULT")
- set(PRIORITY "0")
- endif()
+ if(PRIORITY AND NOT PRIORITY STREQUAL "SCHED_PRIORITY_DEFAULT")
set(SYMBOL_PRIORITY $<$<NOT:$<BOOL:${USE_LINKER}>>:-Wl,>--defsym
nx_priority=${PRIORITY})
endif()