[RFA]: Thread safe stdio again

Christopher Faylor cgf-no-personal-reply-please@cygwin.com
Fri Mar 26 06:50:00 GMT 2004

On Sun, Mar 14, 2004 at 08:28:02PM +0100, Thomas Pfaff wrote:
>This time i am using the non portable mutex initializers, therefore
>moving __sinit is no longer needed. And i added calls to newlibs
>__fp_lock_all and __fp_unlock_all at fork.
>2004-03-14 Thomas Pfaff <tpfaff@gmx.net>
>	* include/cygwin/_types.h: New file.
>	* include/sys/lock.h: Ditto.
>	* include/sys/stdio.h: Ditto.
>	* thread.cc: Include sys/lock.h
>	(__cygwin_lock_init): New function.
>	(__cygwin_lock_init_recursive): Ditto.
>	(__cygwin_lock_fini): Ditto.
>	(__cygwin_lock_lock): Ditto.
>	(__cygwin_lock_trylock): Ditto.
>	(__cygwin_lock_unlock): Ditto.
>	(pthread::atforkprepare): Lock file pointer before fork.
>	(pthread::atforkparent): Unlock file pointer after fork.
>	(pthread::atforkchild): Ditto.

This is ok to check in.  If you hurry, it will show up in 1.5.10.


More information about the Cygwin-patches mailing list