diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-07-03 14:39:52 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-08-18 10:53:47 -0300 |
commit | c647fb885cb678471f6b6a66f394b4ca5515a016 (patch) | |
tree | 5c6bd65b90aaf1dbe66e1f98df74906fcf275454 /gmon/gmon.c | |
parent | Consolidate non cancellable read call (diff) | |
download | glibc-c647fb885cb678471f6b6a66f394b4ca5515a016.tar.gz glibc-c647fb885cb678471f6b6a66f394b4ca5515a016.tar.bz2 glibc-c647fb885cb678471f6b6a66f394b4ca5515a016.zip |
Consolidate non cancellable write call
This patch consolidates all the non cancellable write calls to use
the __write_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.
* sysdeps/generic/not-cancel.h (write_not_cancel): Remove macro.
(__write_nocancel): New macro.
* sysdeps/unix/sysv/linux/not-cancel.h (__write_nocancel):
Rewrite as a function prototype.
(write_not_cancel): Remove macro.
* sysdeps/unix/sysv/linux/write.c (__write_nocancel): New function.
* gmon/gmon.c (ERR): Replace write_not_cancel with __write_nocancel.
(write_gmon): Likewise.
* libio/fileops.c (_IO_new_file_write): Likewise.
* login/utmp_file.c (pututline_file): Likewise.
(updwtmp_file): Likewise.
* stdio-common/psiginfo.c (psiginfo): Likewise.
* sysdeps/posix/spawni.c (__spawni_child): Likewise.
* sysdeps/unix/sysv/linux/gethostid.c (sethostid): Likewise.
* sysdeps/unix/sysv/linux/libc_fatal.c (backtrace_and_maps):
Likewise.
* sysdeps/unix/sysv/linux/pthread_setname.c (pthread_setname_np):
Likewise.
Diffstat (limited to 'gmon/gmon.c')
-rw-r--r-- | gmon/gmon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gmon/gmon.c b/gmon/gmon.c index 87c3c4e01b..e7701b9757 100644 --- a/gmon/gmon.c +++ b/gmon/gmon.c @@ -58,7 +58,7 @@ struct gmonparam _gmonparam attribute_hidden = { GMON_PROF_OFF }; static int s_scale; #define SCALE_1_TO_1 0x10000L -#define ERR(s) write_not_cancel (STDERR_FILENO, s, sizeof (s) - 1) +#define ERR(s) __write_nocancel (STDERR_FILENO, s, sizeof (s) - 1) void moncontrol (int mode); void __moncontrol (int mode); @@ -375,7 +375,7 @@ write_gmon (void) memcpy (&ghdr.cookie[0], GMON_MAGIC, sizeof (ghdr.cookie)); ghdr.version = GMON_VERSION; memset (ghdr.spare, '\0', sizeof (ghdr.spare)); - write_not_cancel (fd, &ghdr, sizeof (struct gmon_hdr)); + __write_nocancel (fd, &ghdr, sizeof (struct gmon_hdr)); /* write PC histogram: */ write_hist (fd); |