This is the mail archive of the 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]

[PATCH v2 04/16] Use msgsnd syscall for Linux implementation

Changes from previous version:

  - Use __ASSUME_SYSVIPC_SYSCALL instead of __NR_syscall to issue the
    wired syscall or the ipc one.


This patch add a direct call to msgsnd syscall if it is supported by
kernel features.

hecked on x86_64, i686, powerpc64le, aarch64, and armhf.

	* sysdeps/unix/sysv/linux/msgsnd.c (__libc_msgsnd): Use msgsnd syscall
	if defined.
 ChangeLog                        | 3 +++
 sysdeps/unix/sysv/linux/msgsnd.c | 7 ++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/msgsnd.c b/sysdeps/unix/sysv/linux/msgsnd.c
index 1457e43..4ed3a64 100644
--- a/sysdeps/unix/sysv/linux/msgsnd.c
+++ b/sysdeps/unix/sysv/linux/msgsnd.c
@@ -16,17 +16,18 @@
    License along with the GNU C Library; if not, see
    <>.  */
-#include <errno.h>
 #include <sys/msg.h>
 #include <ipc_priv.h>
 #include <sysdep-cancel.h>
-#include <sys/syscall.h>
 __libc_msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg)
+  return SYSCALL_CANCEL (msgsnd, msqid, msgp, msgsz, msgflg);
   return SYSCALL_CANCEL (ipc, IPCOP_msgsnd, msqid, msgsz, msgflg,
 			 (void *) msgp);
 weak_alias (__libc_msgsnd, msgsnd)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]