[PATCH] powerpc: Enable demuxed sysv IPC syscalls
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Dec 3 21:11:00 GMT 2015
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.
More information about the Libc-alpha
mailing list