This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.26-156-ga8410a5
- From: azanella at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 21 Aug 2017 18:39:11 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.26-156-ga8410a5
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via a8410a5fc9305c316633a5a3033f3927b759be35 (commit)
via 7369800c04f3c0fb9fb15821feb10a7976425aca (commit)
via 19926de954bf89feb443aadd4db47a4e912b97b1 (commit)
from df1deda60050cc8a68156cf6c81ad42363647a29 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a8410a5fc9305c316633a5a3033f3927b759be35
commit a8410a5fc9305c316633a5a3033f3927b759be35
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Jul 3 15:43:51 2017 -0300
Consolidate non cancellable waitpid call
This patch consolidates all the non cancellable waitpid calls to use
the __waitpid_nocancel identifier. For non cancellable targets it will
be just a macro to call the default respective symbol while on Linux
will be a internal one.
Checked on x86_64-linux-gnu, x86_64-linux-gnu-x32, and i686-linux-gnu.
* libio/ioopen.c (_IO_waitpid): Replace waitpid_not_cancel with
__waitpid_nocancel.
* sysdeps/generic/not-cancel.h (waitpid_not_cancel): Remove macro.
(__waitpid_nocancel): New macro.
* sysdeps/unix/sysv/linux/not-cancel.h (waitpid_not_cancel): Remove
macro.
(__waitpid_nocancel): Replace macro with a function.
* sysdeps/unix/sysv/linux/waitpid.c (__waitpid_nocancel): New
function.
diff --git a/ChangeLog b/ChangeLog
index 759aa4b..3d2afd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2017-08-21 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * libio/ioopen.c (_IO_waitpid): Replace waitpid_not_cancel with
+ __waitpid_nocancel.
+ * sysdeps/generic/not-cancel.h (waitpid_not_cancel): Remove macro.
+ (__waitpid_nocancel): New macro.
+ * sysdeps/unix/sysv/linux/not-cancel.h (waitpid_not_cancel): Remove
+ macro.
+ (__waitpid_nocancel): Replace macro with a function.
+ * sysdeps/unix/sysv/linux/waitpid.c (__waitpid_nocancel): New
+ function.
+
* login/utmp_file.c (timeout_handler): Replace fcntl_not_cancel with
__fcntl_nocancel.
* sysdeps/generic/not-cancel.h (fcntl_not_cancel): Remove macro.
diff --git a/libio/iopopen.c b/libio/iopopen.c
index 0c20cbb..a2ddebb 100644
--- a/libio/iopopen.c
+++ b/libio/iopopen.c
@@ -61,7 +61,7 @@ extern int _IO_dup2 (int fd, int fd2) __THROW;
#ifndef _IO_waitpid
#ifdef _LIBC
-#define _IO_waitpid waitpid_not_cancel
+#define _IO_waitpid __waitpid_nocancel
#else
#define _IO_waitpid waitpid
#endif
diff --git a/sysdeps/generic/not-cancel.h b/sysdeps/generic/not-cancel.h
index cf84550..3f924c8 100644
--- a/sysdeps/generic/not-cancel.h
+++ b/sysdeps/generic/not-cancel.h
@@ -36,7 +36,7 @@
__write (fd, buf, n)
#define __writev_nocancel_nostatus(fd, iov, n) \
(void) __writev (fd, iov, n)
-# define waitpid_not_cancel(pid, stat_loc, options) \
+# define __waitpid_nocancel(pid, stat_loc, options) \
__waitpid (pid, stat_loc, options)
#define pause_not_cancel() \
__pause ()
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index acf5775..c4a60b8 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -25,6 +25,7 @@
#include <errno.h>
#include <unistd.h>
#include <sys/syscall.h>
+#include <sys/wait.h>
/* Non cancellable open syscall. */
__typeof (open) __open_nocancel;
@@ -72,10 +73,8 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
}
/* Uncancelable waitpid. */
-#define __waitpid_nocancel(pid, stat_loc, options) \
- INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL)
-#define waitpid_not_cancel(pid, stat_loc, options) \
- __waitpid_nocancel(pid, stat_loc, options)
+__typeof (waitpid) __waitpid_nocancel;
+libc_hidden_proto (__waitpid_nocancel)
/* Uncancelable pause. */
#define pause_not_cancel() \
diff --git a/sysdeps/unix/sysv/linux/waitpid.c b/sysdeps/unix/sysv/linux/waitpid.c
index 2fed421..efc4480 100644
--- a/sysdeps/unix/sysv/linux/waitpid.c
+++ b/sysdeps/unix/sysv/linux/waitpid.c
@@ -19,6 +19,7 @@
#include <sysdep-cancel.h>
#include <stdlib.h>
#include <sys/wait.h>
+#include <not-cancel.h>
__pid_t
__waitpid (__pid_t pid, int *stat_loc, int options)
@@ -31,3 +32,14 @@ __waitpid (__pid_t pid, int *stat_loc, int options)
}
libc_hidden_def (__waitpid)
weak_alias (__waitpid, waitpid)
+
+__pid_t
+__waitpid_nocancel (__pid_t pid, int *stat_loc, int options)
+{
+#ifdef __NR_waitpid
+ return INLINE_SYSCALL_CALL (waitpid, pid, stat_loc, options);
+#else
+ return INLINE_SYSCALL_CALL (wait4, pid, stat_loc, options, NULL);
+#endif
+}
+libc_hidden_def (__waitpid_nocancel)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7369800c04f3c0fb9fb15821feb10a7976425aca
commit 7369800c04f3c0fb9fb15821feb10a7976425aca
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Jul 3 15:37:16 2017 -0300
Consolidate non cancellable fcntl call
This patch consolidates all the non cancellable fcntl calls to use
the __fcntl_nocancel identifier. For non cancellable targets it will
be just a macro to call the default respective symbol while on Linux
will be a internal one.
Since its prototype is already defined at internal fcntl.h header, it
is removed from not-cancel.h one.
Checked on x86_64-linux-gnu, x86_64-linux-gnu-x32, and i686-linux-gnu.
* login/utmp_file.c (timeout_handler): Replace fcntl_not_cancel with
__fcntl_nocancel.
* sysdeps/generic/not-cancel.h (fcntl_not_cancel): Remove macro.
* sysdeps/unix/sysv/linux/not-cancel.h (fcntl_not_cancel): Likewise.
diff --git a/ChangeLog b/ChangeLog
index 6e74ce3..759aa4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2017-08-21 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * login/utmp_file.c (timeout_handler): Replace fcntl_not_cancel with
+ __fcntl_nocancel.
+ * sysdeps/generic/not-cancel.h (fcntl_not_cancel): Remove macro.
+ * sysdeps/unix/sysv/linux/not-cancel.h (fcntl_not_cancel): Likewise.
+
* gmon/gmon.c (write_hist): Replace writev_not_cancel_no_status with
__writev_nocancel_nostatus.
(write_call_graph): Likewise.
diff --git a/login/utmp_file.c b/login/utmp_file.c
index 68e00f2..d410b6c 100644
--- a/login/utmp_file.c
+++ b/login/utmp_file.c
@@ -81,7 +81,7 @@ static void timeout_handler (int signum) {};
memset (&fl, '\0', sizeof (struct flock)); \
fl.l_type = (type); \
fl.l_whence = SEEK_SET; \
- if (fcntl_not_cancel ((fd), F_SETLKW, &fl) < 0)
+ if (__fcntl_nocancel ((fd), F_SETLKW, &fl) < 0)
#define LOCKING_FAILED() \
goto unalarm_return
@@ -89,7 +89,7 @@ static void timeout_handler (int signum) {};
#define UNLOCK_FILE(fd) \
/* Unlock the file. */ \
fl.l_type = F_UNLCK; \
- fcntl_not_cancel ((fd), F_SETLKW, &fl); \
+ __fcntl_nocancel ((fd), F_SETLKW, &fl); \
\
unalarm_return: \
/* Reset the signal handler and alarm. We must reset the alarm \
diff --git a/sysdeps/generic/not-cancel.h b/sysdeps/generic/not-cancel.h
index e3ed0e6..cf84550 100644
--- a/sysdeps/generic/not-cancel.h
+++ b/sysdeps/generic/not-cancel.h
@@ -36,8 +36,6 @@
__write (fd, buf, n)
#define __writev_nocancel_nostatus(fd, iov, n) \
(void) __writev (fd, iov, n)
-#define fcntl_not_cancel(fd, cmd, val) \
- __fcntl (fd, cmd, val)
# define waitpid_not_cancel(pid, stat_loc, options) \
__waitpid (pid, stat_loc, options)
#define pause_not_cancel() \
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 29926d3..acf5775 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -71,10 +71,6 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
INTERNAL_SYSCALL_CALL (writev, err, fd, iov, iovcnt);
}
-/* Uncancelable fcntl. */
-#define fcntl_not_cancel(fd, cmd, val) \
- __fcntl_nocancel (fd, cmd, val)
-
/* Uncancelable waitpid. */
#define __waitpid_nocancel(pid, stat_loc, options) \
INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19926de954bf89feb443aadd4db47a4e912b97b1
commit 19926de954bf89feb443aadd4db47a4e912b97b1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Jul 3 15:33:23 2017 -0300
Consolidate non cancellable writev call
This patch consolidates all the non cancellable writev calls to use
the __writev_nocancel identifier. For non cancellable targets it will
be just a macro to call the default respective symbol while on Linux
will be a internal one.
Checked on x86_64-linux-gnu, x86_64-linux-gnu-x32, and i686-linux-gnu.
* gmon/gmon.c (write_hist): Replace writev_not_cancel_no_status with
__writev_nocancel_nostatus.
(write_call_graph): Likewise.
(write_bb_counts): Likewise.
* resolv/herror.c (herror): Likewise.
* sysdeps/generic/not-cancel.h (writev_not_cancel_no_status): Remove
macro.
(__writev_nocancel_nostatus): New macro.
* sysdeps/unix/sysv/linux/not-cancel.h (writev_not_cancel_no_status):
Remove macro.
(__writev_nocancel_nostatus): New function.
diff --git a/ChangeLog b/ChangeLog
index 0e0ab13..6e74ce3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2017-08-21 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ * gmon/gmon.c (write_hist): Replace writev_not_cancel_no_status with
+ __writev_nocancel_nostatus.
+ (write_call_graph): Likewise.
+ (write_bb_counts): Likewise.
+ * resolv/herror.c (herror): Likewise.
+ * sysdeps/generic/not-cancel.h (writev_not_cancel_no_status): Remove
+ macro.
+ (__writev_nocancel_nostatus): New macro.
+ * sysdeps/unix/sysv/linux/not-cancel.h (writev_not_cancel_no_status):
+ Remove macro.
+ (__writev_nocancel_nostatus): New function.
+
2017-08-21 Joseph Myers <joseph@codesourcery.com>
Revert:
diff --git a/gmon/gmon.c b/gmon/gmon.c
index 90c7895..c1d1701 100644
--- a/gmon/gmon.c
+++ b/gmon/gmon.c
@@ -216,7 +216,7 @@ write_hist (int fd)
strncpy (thdr.dimen, "seconds", sizeof (thdr.dimen));
thdr.dimen_abbrev = 's';
- writev_not_cancel_no_status (fd, iov, 3);
+ __writev_nocancel_nostatus (fd, iov, 3);
}
}
@@ -273,13 +273,13 @@ write_call_graph (int fd)
if (++nfilled == NARCS_PER_WRITEV)
{
- writev_not_cancel_no_status (fd, iov, 2 * nfilled);
+ __writev_nocancel_nostatus (fd, iov, 2 * nfilled);
nfilled = 0;
}
}
}
if (nfilled > 0)
- writev_not_cancel_no_status (fd, iov, 2 * nfilled);
+ __writev_nocancel_nostatus (fd, iov, 2 * nfilled);
}
@@ -312,12 +312,12 @@ write_bb_counts (int fd)
for (grp = __bb_head; grp; grp = grp->next)
{
ncounts = grp->ncounts;
- writev_not_cancel_no_status (fd, bbhead, 2);
+ __writev_nocancel_nostatus (fd, bbhead, 2);
for (nfilled = i = 0; i < ncounts; ++i)
{
if (nfilled > (sizeof (bbbody) / sizeof (bbbody[0])) - 2)
{
- writev_not_cancel_no_status (fd, bbbody, nfilled);
+ __writev_nocancel_nostatus (fd, bbbody, nfilled);
nfilled = 0;
}
@@ -325,7 +325,7 @@ write_bb_counts (int fd)
bbbody[nfilled++].iov_base = &grp->counts[i];
}
if (nfilled > 0)
- writev_not_cancel_no_status (fd, bbbody, nfilled);
+ __writev_nocancel_nostatus (fd, bbbody, nfilled);
}
}
diff --git a/resolv/herror.c b/resolv/herror.c
index b3df236..45c0a5d 100644
--- a/resolv/herror.c
+++ b/resolv/herror.c
@@ -89,7 +89,7 @@ herror(const char *s) {
v++;
v->iov_base = (char *) "\n";
v->iov_len = 1;
- writev_not_cancel_no_status(STDERR_FILENO, iov, (v - iov) + 1);
+ __writev_nocancel_nostatus(STDERR_FILENO, iov, (v - iov) + 1);
}
/*
diff --git a/sysdeps/generic/not-cancel.h b/sysdeps/generic/not-cancel.h
index ee9988a..e3ed0e6 100644
--- a/sysdeps/generic/not-cancel.h
+++ b/sysdeps/generic/not-cancel.h
@@ -34,7 +34,7 @@
__read (fd, buf, n)
#define __write_nocancel(fd, buf, n) \
__write (fd, buf, n)
-#define writev_not_cancel_no_status(fd, iov, n) \
+#define __writev_nocancel_nostatus(fd, iov, n) \
(void) __writev (fd, iov, n)
#define fcntl_not_cancel(fd, cmd, val) \
__fcntl (fd, cmd, val)
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 5182451..29926d3 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -62,10 +62,14 @@ __close_nocancel_nostatus (int fd)
__close_nocancel (fd);
}
-/* Uncancelable writev. */
-#define writev_not_cancel_no_status(fd, iov, n) \
- (void) ({ INTERNAL_SYSCALL_DECL (err); \
- INTERNAL_SYSCALL (writev, err, 3, (fd), (iov), (n)); })
+/* Non cancellable writev syscall that does not also set errno in case of
+ failure. */
+static inline void
+__writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt)
+{
+ INTERNAL_SYSCALL_DECL (err);
+ INTERNAL_SYSCALL_CALL (writev, err, fd, iov, iovcnt);
+}
/* Uncancelable fcntl. */
#define fcntl_not_cancel(fd, cmd, val) \
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 29 +++++++++++++++++++++++++++++
gmon/gmon.c | 12 ++++++------
libio/iopopen.c | 2 +-
login/utmp_file.c | 4 ++--
resolv/herror.c | 2 +-
sysdeps/generic/not-cancel.h | 6 ++----
sysdeps/unix/sysv/linux/not-cancel.h | 23 +++++++++++------------
sysdeps/unix/sysv/linux/waitpid.c | 12 ++++++++++++
8 files changed, 64 insertions(+), 26 deletions(-)
hooks/post-receive
--
GNU C Library master sources