arch/arm64: disable fork support in protected build mode

Modify ARM64 architecture configuration to disable fork support in protected
build mode (BUILD_PROTECTED). Update ARCH_HAVE_FORK condition from
"!BUILD_KERNEL" to "!BUILD_KERNEL && !BUILD_PROTECTED", ensuring fork is
only available in flat/monolithic builds, not in protected kernel builds.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5
2025-04-26 15:27:55 +08:00
committed by Xiang Xiao
parent 29bc8c7b15
commit 3129c06390
2 changed files with 4 additions and 2 deletions
@@ -358,7 +358,9 @@ Functions
NOTE: ``vfork()`` is not an independent NuttX feature, but is
implemented in architecture-specific logic (using only helper
functions from the NuttX core logic). As a result, ``vfork()`` may
not be available on all architectures.
not be available on all architectures. The current implementation in
NuttX arm64 only guarantees that ``vfork()`` works when
CONFIG_BUILD_FLAT=y.
:return: Upon successful completion, ``vfork()`` returns 0 to
the child process and returns the process ID of the child process to the
+1 -1
View File
@@ -29,7 +29,7 @@ config ARCH_ARM64
select ARCH_64BIT
select ARCH_HAVE_BACKTRACE
select ARCH_HAVE_INTERRUPTSTACK
select ARCH_HAVE_FORK if !BUILD_KERNEL
select ARCH_HAVE_FORK if !BUILD_KERNEL && !BUILD_PROTECTED
select ARCH_HAVE_STACKCHECK
select ARCH_HAVE_CUSTOMOPT
select ARCH_HAVE_STDARG_H