[Bug libc/1005] putc() runs slower
Paul Eggert
eggert@CS.UCLA.EDU
Thu Jul 14 23:31:00 GMT 2005
Uttam Pawar <uttamp@us.ibm.com> writes:
> it's time consuming for the users to find and replace
> (assuming they have source access, resources and knowledge of glibc) all
> the putc() calls they used in their application with putc_unlocked().
Users can employ the unlocked-io module of gnulib. That is what
coreutils, tar, etc. do. The only change to the C source code is to
add "#include <unlocked-io.h>"; you needn't replace putc, etc. See:
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/gnulib/gnulib/MODULES.html?rev=HEAD&content-type=text/html#module=unlocked-io
and for an example of it in use, see:
ftp://ftp.gnu.org/gnu/coreutils/coreutils-5.2.1.tar.gz
I wouldn't object to adding something like <unlocked-io.h> to glibc,
but I wouldn't say it's essential either.
More information about the Libc-alpha
mailing list