This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] powerpc: Enable demuxed sysv IPC syscalls
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Thu, 3 Dec 2015 19:11:01 -0200
- Subject: Re: [PATCH] powerpc: Enable demuxed sysv IPC syscalls
- Authentication-results: sourceware.org; auth=none
- References: <5660A8D0 dot 5090003 at linux dot vnet dot ibm dot com>
On 03-12-2015 18:40, Paul E. Murphy wrote:
> PPC kernel 4.4rc1 and newer support these syscalls. They should be
> a little faster. This adds support for the common implementations.
> Other architectures need only define the appropriate macros in
> their kernel-features.h, if they can take advantage of them.
>
>
> diff --git a/sysdeps/unix/sysv/linux/msgctl.c b/sysdeps/unix/sysv/linux/msgctl.c
> index a24dc38..86f34a2 100644
> --- a/sysdeps/unix/sysv/linux/msgctl.c
> +++ b/sysdeps/unix/sysv/linux/msgctl.c
> @@ -56,7 +56,11 @@ int
> attribute_compat_text_section
> __old_msgctl (int msqid, int cmd, struct __old_msqid_ds *buf)
> {
> +#ifdef __ASSUME_MSGCTL_SYSCALL
> + return INLINE_SYSCALL (msgctl, 3, msqid, cmd, buf);
> +#else
> return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, msqid, cmd, 0, buf);
> +#endif
> }
My inclination would to avoid the __ASSUME_XXX macros definition and just
check if the current kernel header defines of not __NR_msgctl and use it
as the condition to enable the wire-up syscall.
It has the advantage of the avoid each enabled architecture to explicit
add these macros to actually enable the new mechanism. The downside is
you would not be able to set this new mechanism using --enable-kernel.