This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] sysdeps/wait: Use the waitid syscall if required
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Alistair Francis <alistair23 at gmail dot com>
- Cc: "Dmitry V. Levin" <ldv at altlinux dot org>, "Maciej W. Rozycki" <macro at wdc dot com>, Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 22 Oct 2019 22:38:53 +0000
- Subject: Re: [PATCH] sysdeps/wait: Use the waitid syscall if required
- Ironport-sdr: 284vkWcwWQF/+EliUFJxHIY7Q+r+SOi+aMo/0E013EApF+jiXMJJi2EbK/fsgXRXeHyJqlF1po hucqXd/J0VZepUv7HNsVvMfpSN8dfkO3yV4WjWcI3J84yHeI9iq+DGhuIdCz9AZVyG5CxXhRyj Ln1mYvYIayKoIH4vLnYgdjUGyQVOoC1t09Metgp5AHTAn2pWGHkXUoqOxkd9K+5jY7r9NoQWe+ itTLjZkbZ/370/z3wunrUry2OKQ+RmcHkmfl7s8jlfYqaItbeoRiRYiD7HWw4+7uhvPsaBHglE HMs=
- Ironport-sdr: GEgOhMWrVdfT32n93j5nB2vZvZWsVNVCs7PXGfB6cZhDCJd4S0b/8m44BmBMK/o2Sc07dvGkU+ nAstbI8tFddm7qouP23tEmjH/CVzV1OtJIqitYMVnURZczkAO45WRE+K3NYaiuibDK/lM2U3fV WNL0UsSI0D/4Wv+OrLWxhVOBTyDkT05DUXTOo8WTEX+S9EeJNJvagDoGrr+KZcgtlC6zKxjm4m Z4VCPLWPeVZ1ZyGLoC54Gl/GUmGDole5SMTRuJxmOp+bwRStm9lwgJ2TrlKnqvQpAnvqnKGh9D Vn8=
- References: <20190925225514.7224-1-alistair.francis@wdc.com> <20191012122450.GA659@altlinux.org> <CAKmqyKOqFV10nOq0f0JxoXDRqQ-4+08rbGYxMFWtgKe=Bv6Mxg@mail.gmail.com> <20191016173531.GB2848@altlinux.org> <CAKmqyKNfBMFxV+Lq_ztpS9MBFiPUweMA9iQLnA5qDFndki+oPw@mail.gmail.com> <20191016183613.GA3512@altlinux.org> <CAKmqyKNB+qHrH3kHHB42g5UH3WjWQpz8XWncedi_2Ef_aeA_5A@mail.gmail.com>
On Tue, 22 Oct 2019, Alistair Francis wrote:
> How would I do this? The only option I can see is for RISC-V to have
> it's own syscall.list that removes the wait4 call. Is there a better
> way to override these?
You could write a wait4.c implementation which overrides the syscalls.list
entry by being in a sysdeps directory that gets searched earlier (and
check the build logs to make sure the intended implementation is indeed
getting built, as it's easy to get sysdeps ordering wrong). You don't
need your own syscalls.list.
If this issue applies for all future 32-bit linux/generic architectures,
the implementation might go in sysdeps/unix/sysv/linux/generic/wordsize-32
and have #if conditionals allowing it use the wait4 syscall on
architectures that have it, if doing so is desirable. It shouldn't go in
a RISC-V-specific directory unless it's genuinely specific to RISC-V and
not other future architectures. Or it could go in
sysdeps/unix/sysv/linux/wait4.c, with the syscalls.list entry being
removed.
--
Joseph S. Myers
joseph@codesourcery.com