This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] sysdeps/wait: Use the waitid syscall if required


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]