Consolidate non cancellable write call
commitc647fb885cb678471f6b6a66f394b4ca5515a016
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 3 Jul 2017 17:39:52 +0000 (3 14:39 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 18 Aug 2017 13:53:47 +0000 (18 10:53 -0300)
tree5c6bd65b90aaf1dbe66e1f98df74906fcf275454
parenta748eb31c137e9b69c3d81765271a544f93f8fe5
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.
12 files changed:
ChangeLog
gmon/gmon.c
libio/fileops.c
login/utmp_file.c
stdio-common/psiginfo.c
sysdeps/generic/not-cancel.h
sysdeps/posix/spawni.c
sysdeps/unix/sysv/linux/gethostid.c
sysdeps/unix/sysv/linux/libc_fatal.c
sysdeps/unix/sysv/linux/not-cancel.h
sysdeps/unix/sysv/linux/pthread_setname.c
sysdeps/unix/sysv/linux/write.c