mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Call direct system calls for socket operations
Explicit system calls for the socket operations were added in Linux kernel in commit 86250b9d12ca for powerpc. This patch make use of those instead of calling socketcall to save number of cycles on networking syscalls. 2015-08-25 Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> * sysdeps/unix/sysv/linux/powerpc/kernel-features.h: Define new macros. * sysdeps/unix/sysv/linux/accept.c: Call direct system call. * sysdeps/unix/sysv/linux/bind.c: Call direct system call. * sysdeps/unix/sysv/linux/connect.c: Call direct system call. * sysdeps/unix/sysv/linux/getpeername.c: Call direct system call. * sysdeps/unix/sysv/linux/getsockname.c: Call direct system call. * sysdeps/unix/sysv/linux/getsockopt.c: Call direct system call. * sysdeps/unix/sysv/linux/listen.c: Call direct system call. * sysdeps/unix/sysv/linux/recv.c: Call direct system call. * sysdeps/unix/sysv/linux/recvfrom.c: Call direct system call. * sysdeps/unix/sysv/linux/recvmsg.c: Call direct system call. * sysdeps/unix/sysv/linux/send.c: Call direct system call. * sysdeps/unix/sysv/linux/sendmsg.c: Call direct system call. * sysdeps/unix/sysv/linux/sendto.c: Call direct system call. * sysdeps/unix/sysv/linux/setsockopt.c: Call direct system call. * sysdeps/unix/sysv/linux/shutdown.c: Call direct system call. * sysdeps/unix/sysv/linux/socket.c: Call direct system call. * sysdeps/unix/sysv/linux/socketpair.c: Call direct system call.
This commit is contained in:
committed by
Tulio Magno Quites Machado Filho
parent
18173559a2
commit
f4491417cc
@ -21,11 +21,17 @@
|
||||
|
||||
#include <sysdep-cancel.h>
|
||||
#include <socketcall.h>
|
||||
#include <kernel-features.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
ssize_t
|
||||
__libc_sendmsg (int fd, const struct msghdr *msg, int flags)
|
||||
{
|
||||
#ifdef __ASSUME_SENDMSG_SYSCALL
|
||||
return SYSCALL_CANCEL (sendmsg, fd, msg, flags);
|
||||
#else
|
||||
return SOCKETCALL_CANCEL (sendmsg, fd, msg, flags);
|
||||
#endif
|
||||
}
|
||||
weak_alias (__libc_sendmsg, sendmsg)
|
||||
weak_alias (__libc_sendmsg, __sendmsg)
|
||||
|
Reference in New Issue
Block a user