-
Committer:
Ben Hutchings
-
Date:
2024-10-02 00:07:27 UTC
-
Revision ID:
git-v1:ccfcaca5bb151e8c2ddc3cd99172dea98429278a
[klibc] syscalls: Clean up the fork() and clone() definitions
Currently we're defining __clone() on all architectures, but it's only
needed where fork() is missing and it's broken on s390 and s390x where
the parameter order is incompatible.
We're also building a list of new architectures which don't implement
fork(), when we could automatically detect that.
To fix these problems:
- If __NR_fork is defined, generate a fork() system call wrapper, with
only sparc and sparc64 as special cases.
- Otherwise, generate __clone() as a clone() system call wrapper.
Comment why this works despite the architecture differences.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>