mirror of
https://github.com/apache/nuttx.git
synced 2026-08-20 13:08:26 +00:00
|
Some checks failed
x86 selected neither fork primitive, so vfork() was not available on this architecture at all. fork.S takes the register snapshot and hands it to x86_fork(), which allocates the child, copies the used part of the caller's stack, and starts it. There is one entry point for both primitives, because the snapshot is the same for either. Unlike the register-passing architectures, cdecl puts the flag on the stack, so up_fork() loads it from 4(%esp). That slot is also the stack pointer the caller had: it pushed the argument, then `call' pushed the return address. So the low end of the region that x86_fork() copies is unchanged. POSIX fork() is not provided. It needs an address environment that can be duplicated and this architecture has none, so CONFIG_ARCH_HAVE_FORK is never set here. x86_fork.c makes that a build error rather than a silent omission. Verified under QEMU with qemu-i486:nsh. ostest runs to the end and reports "Child 5 ran and exited before the parent resumed", with fork() correctly absent. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com> |
||
|---|---|---|
| .. | ||
| include | ||
| src | ||
| Kconfig | ||