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
..
2010-12-06 12:05:11 +01:00
2011-02-03 18:07:41 +01:00
2010-03-17 16:11:37 -05:00
2009-03-03 19:28:35 -08:00
2010-01-15 15:57:02 -08:00
2010-01-15 15:57:02 -08:00
2009-03-03 19:28:35 -08:00
2010-01-15 15:57:02 -08:00
2010-02-12 11:37:25 -08:00
2009-03-03 19:28:35 -08:00
2010-01-15 15:01:44 -08:00
2010-12-20 15:58:06 +01:00
2011-02-14 09:32:56 -08:00
2010-11-30 12:45:02 -08:00
2010-06-11 14:39:39 -07:00