platform_bionic/libc/include
Kenny Root f582340a6a Fix the handle locking in stdio
Fix the handle locking in stdio to use flockfile/funlockfile
internally when and where required.  Macros in <stdio.h> are updated
to automatically call the underlying functions when the process is
threaded to obtain the necessary locking.  A private mutex is added
to protect __sglue, the internal list of FILE handles, and another
to protect the one-time initialization.  Some routines in libc that
use getc() change to use getc_unlocked() as they're either protected
by their own lock or aren't thread-safe routines anyway.

Based on OpenBSD change by guenther@openbsd.org
http://www.mail-archive.com/source-changes@cvs.openbsd.org/msg01015.html

Bug: 3446659
Change-Id: Ie82116e358c541718d6709ec45ca6796be5a007b
2011-02-14 09:32:56 -08:00
..
android libc: Add <android/api-level.h> 2010-12-06 12:05:11 +01:00
arpa Import include/arpa/telnet.h from BSD 2010-01-15 15:15:52 -08:00
net added missing ether_aton and ether_ntoa 2010-08-25 08:46:23 -07:00
netinet Add icmp6.h and ip6.h files from current NetBSD libc. 2011-01-28 18:28:27 +01:00
netpacket auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
sys libc: Update auto-gen scripts 2011-02-03 18:07:41 +01:00
alloca.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
assert.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
byteswap.h Fixes for the ARM-specific bswap_16, bswap_32, and bswap_64. 2010-09-26 11:26:53 -07:00
ctype.h Import change from ctype.h revision 1.20 from openbsd 2010-01-15 15:57:02 -08:00
dirent.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
dlfcn.h Added support for dladdr() 2010-03-17 16:11:37 -05:00
elf.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
endian.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
err.h Add fts, err, and sys/queue for grep 2010-01-15 15:57:02 -08:00
errno.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
fcntl.h libc: add missing O_CLOEXEC from <fcntl.h> 2010-09-27 17:33:40 +02:00
features.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
fnmatch.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
fts.h Add fts, err, and sys/queue for grep 2010-01-15 15:57:02 -08:00
getopt.h libc: tag missing functions in system headers. 2010-10-09 17:56:55 +02:00
grp.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
inttypes.h Remove compiler warnings when building Bionic. 2010-06-22 17:51:41 -07:00
lastlog.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
libgen.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
limits.h Remove compiler warnings when building Bionic. 2010-06-22 17:51:41 -07:00
locale.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
malloc.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
memory.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
mntent.h mntent.h requires stdio.h 2010-01-15 15:57:02 -08:00
netdb.h Changed __get_h_errno linkage to "C". 2010-02-12 11:37:25 -08:00
nsswitch.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
pathconf.h libc: Add missing C++ guards to <pathconf.h> 2010-09-27 17:27:14 +02:00
paths.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
poll.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
pthread.h am bd8d987b: libc: remove C++ comments from public headers. 2010-09-28 00:13:43 -07:00
pwd.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
regex.h Import regex from OpenBSD 2010-01-15 15:01:44 -08:00
resolv.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
sched.h <sched.h>: Add sched_getcpu() and cpu_set_t 2010-12-06 13:42:54 +01:00
semaphore.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
setjmp.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
sgtty.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
sha1.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
signal.h libc: Fix the definition of SIGRTMAX 2010-12-20 15:58:06 +01:00
stdint.h Define 64 bit types if compiling with -std=c99 2009-09-14 16:45:50 +02:00
stdio.h Fix the handle locking in stdio 2011-02-14 09:32:56 -08:00
stdlib.h Add mkdtemp() prototype to stdlib.h. 2010-11-30 12:45:02 -08:00
string.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
strings.h Make sure size_t is defined before used in strings.h 2009-07-22 11:41:02 +02:00
syslog.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
termio.h libc: Add missing <termio.h> header 2010-06-11 14:39:39 -07:00
termios.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
time.h <time.h>: Add timegm(), timelocal() and others. 2010-12-06 12:25:52 +01:00
time64.h libc: allow usage of time64.h from cpp code 2009-11-23 16:25:32 -05:00
unistd.h libc: Add ftruncate64 and improve 64-bit parameter syscall handling. 2010-12-16 17:04:41 +01:00
util.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
utime.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
utmp.h libc: remove C++ comments from public headers. 2010-09-27 17:35:26 +02:00
wchar.h Add wcscasecmp() and wcsncasecmp() prototypes to wchar.h. 2010-11-29 13:15:07 -08:00
wctype.h auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00