[PATCH]: Thread safe stdio with cygwin

Thomas Pfaff tpfaff@gmx.net
Mon Jan 12 10:10:00 GMT 2004


This patch adds support for thread safe stdio for Cygwin.

Cygwin uses dynamic mutexes for locking, therefore it is
necessary to:

1. Initialize FILE pointers _lock properly.
2. Destroy the lock when it is no longer needed.

Regards,

Thomas

2004-01-12  Thomas Pfaff  <tpfaff@gmx.net>

	* libc/stdio/fclose.c: Include sys/lock.h.
	(fclose): Destroy lock when file is closed.
	* libc/stdio/findfp.c (__sfp): Initialize file pointers _lock
	member.
	* libc/stdio/freopen.c: Include sys/lock.h.
	(_freopen_r): Destroy lock when file is closed.
	* libc/stdio/vfprintf.c (__sbprintf): Initialize file pointers
	_lock member.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: newlib.patch
URL: <http://sourceware.org/pipermail/newlib/attachments/20040112/2095c0bc/attachment.ksh>


More information about the Newlib mailing list