[PATCH v4] linux: Add openat2 (BZ 31664)

Paul Eggert eggert@cs.ucla.edu
Mon Aug 25 14:53:51 GMT 2025


On 2025-08-21 10:28, Paul Eggert wrote:
> On 8/21/25 06:38, Adhemerval Zanella wrote:
>> +extern int openat2 (int __dfd, const char *__filename, struct 
>> open_how *__how,
>> +            size_t __usize)
>> +     __nonnull ((2, 3));
> 
> The pointer arguments should be marked with __restrict, for the same 
> reason similar syscalls mark them that way.
> 
> The __how argument should be pointer to const.

Oh, sorry, I contradicted myself. If __how is marked 'const' then 
'__restrict' should not be added, for the same reason syscalls like 
utimensat lack '__restrict' (all pointer args are pointer-to-const). So 
please just add 'const' and don't add '__restrict'.


More information about the Libc-alpha mailing list