bug-mes
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 10/16] lib: General Linux RV64 syscall support.


From: W. J. van der Laan
Subject: Re: [PATCH 10/16] lib: General Linux RV64 syscall support.
Date: Tue, 04 May 2021 11:05:13 +0000

Hello,

On Sunday, May 2nd, 2021 at 5:48 PM, Jan Nieuwenhuizen <janneke@gnu.org> wrote:

> Why use openAT here instead of open? If we really want openat on
> RISC-V, I would like to support this without all these repeated macros
> and move these at variants to their own file

On modern kernels, open() is a wrapper for openat(). It is provided for 
backwards compatibility with older binaries only. Newer architectures do not 
have these backwards compatibility constraints, so don't have that syscall at 
all. The only way to open is thus to use openat().

Same for the other syscalls I've replaced in this patch. Doing it in some way 
is a necessity, unfortunately.

> lib/linux/_openat3.c, or
> lib/linux/at/_open3.c
> lib/linux/<api?>/_open3.c
> and update build-aux/configure-lib.sh accordingly.
> [..]

Yes, that would work too. These are pure syscall wrappers with virtually no 
implementation so having them in separate implementation files, where the build 
script chooses which one to use based on the target arch, would work too.

-W




reply via email to

[Prev in Thread] Current Thread [Next in Thread]