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] [powerpc] Use DIRECT_SYSVIPC_SYSCALLS


On Thu, 10 Oct 2019, Adhemerval Zanella wrote:

> As you have pointed out, tying up wire-up semop with __NR_semop
> definition might indeed create a wrong build.  For this case I 
> would prefer to instead of a sysdep override to do something as below:
> 
> --
> #__ASSUME_DIRECT_SYSVIPC_SYSCALLS
> # ifdef __NR_semop
>   int res = INLINE_SYSCALL_CALL (semop, semid, sops, nsops);
>   if (ret >= 0 || errno != ENOSYS)
>     return ret;

If __ASSUME_DIRECT_SYSVIPC_SYSCALLS does not imply presence of the semop 
syscall, that should be made clear in the comment on the default 
definition.  If in addition the semop syscall might be added on 
architectures that do define __ASSUME_DIRECT_SYSVIPC_SYSCALLS but don't 
currently define semop, to me that indicates a separate 
__ASSUME_SEMOP_SYSCALL is needed.  (Note how we have lots of separate 
__ASSUME_* macros for socket syscalls, which avoids such complications in 
using a macro that's supposed to relate to lots of syscalls that aren't 
all present together.)

-- 
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]