diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2017-07-16 11:34:54 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2017-07-28 18:52:38 +0200 |
commit | dcbff4072b6b3e79d768e50c2d58ccc8e307b1bd (patch) | |
tree | 4a8f192ea3726c5e8ee04f060615854275cf08c2 /libpthread/nptl/sysdeps/unix/sysv/linux/sendto.c | |
parent | ccc200d454c712f6e8bfadb4b7c3ee58086d8f2b (diff) |
nptl: remove sysdep-cancel ASM macros, convert to C
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/sendto.c')
-rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/sendto.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sendto.c b/libpthread/nptl/sysdeps/unix/sysv/linux/sendto.c new file mode 100644 index 000000000..216d928ce --- /dev/null +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sendto.c @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2017 Waldemar Brodkorb <wbx@uclibc-ng.org> + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#include <sys/socket.h> +#include <cancel.h> + +#ifndef __NR_sendto +#error Missing definition of NR_sendto needed for cancellation. +#endif + +ssize_t +sendto (int fd, const void *buf, size_t len, int flags, + __CONST_SOCKADDR_ARG addr, socklen_t addrlen) +{ + return _syscall6(ssize_t, __NC(sendto), int, fd, const void* buf, + size_t, len, int, flags, __CONST_SOCKADDR_ARG, + addr.__sockaddr__, socklen_t, addrlen); +} + +CANCELLABLE_SYSCALL(ssize_t, sendto, (int fd, const void *buf, + size_t len, int flags, __CONST_SOCKADDR_ARG addr, + socklen_t addrlen), (fd, buf, len, flags, addr, addrlen)) + +lt_libc_hidden(sendto) |