src/newlib ChangeLog libc/stdio/fclose.c libc/ ...

jjohnstn@sources.redhat.com jjohnstn@sources.redhat.com
Thu Mar 25 22:29:00 GMT 2004


CVSROOT:	/cvs/src
Module name:	src
Changes by:	jjohnstn@sourceware.org	2004-03-25 22:29:18

Modified files:
	newlib         : ChangeLog 
	newlib/libc/stdio: fclose.c fopen.c freopen.c findfp.c local.h 
	                   fwalk.c fcloseall.c fdopen.c 
	newlib/libc/stdio64: fdopen64.c fopen64.c freopen64.c 

Log message:
	2004-03-25  Thomas Pfaff  <tpfaff@gmx.net>
	
	* libc/stdio/fclose.c (fclose): Protect file pointer list when
	releasing a file.
	* libc/stdio/fcloseall.c (_fcloseall_r): Close all files via
	fwalk.
	* libc/stdio/fdopen.c (_fdopen_r): Add calls to
	_flockfile/_funlockfile.
	* libc/stdio/findfp.c: Move __sfp_lock. Change __sfp_lock type
	to recursive.
	Change __lock_acquire/__lock_release calls for __sfp_lock to
	__sfp_lock_acquire/__sfp_lock_release throughout.
	(std): Make sure that file lock is only initialized once.
	(__sfp): Move _file initialization. Initialize file lock.
	(__sfp_lock_acquire): New function.
	(__sfp_lock_release): Ditto.
	(__fp_lock_all): Remove __sfp_lock_acquire call.
	(__fp_unlock_all): Remove __sfp_lock_release call.
	* libc/stdio/fopen.c (_fopen_r): Protect file pointer list.
	Add calls to _flockfile/_funlockfile. Remove
	__lock_init_recursive call.
	* libc/stdio/freopen.c (_freopen_r): Protect file pointer list.
	* libc/stdio/fwalk.c (__fwalk): New static function.
	(_fwalk): Protect file pointer list. Use __fwalk to walk through
	file pointers.
	* libc/stdio/local.h: Add defines for
	__sfp_lock_acquire/__sfp_lock_release when
	single threaded. Add function prototypes otherwise.
	* libc/stdio64/fdopen64.c (_fdopen64_r): Add calls to
	_flockfile/_funlockfile.
	* libc/stdio/fopen64.c (_fopen64_r): Protect file pointer list.
	Add calls to _flockfile/_funlockfile. Remove
	__lock_init_recursive call.
	* libc/stdio/freopen64.c (_freopen64_r): Protect file pointer
	list.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/ChangeLog.diff?cvsroot=src&r1=1.645&r2=1.646
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdio/fclose.c.diff?cvsroot=src&r1=1.5&r2=1.6
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdio/fopen.c.diff?cvsroot=src&r1=1.5&r2=1.6
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdio/freopen.c.diff?cvsroot=src&r1=1.7&r2=1.8
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdio/findfp.c.diff?cvsroot=src&r1=1.11&r2=1.12
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdio/local.h.diff?cvsroot=src&r1=1.8&r2=1.9
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdio/fwalk.c.diff?cvsroot=src&r1=1.3&r2=1.4
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdio/fcloseall.c.diff?cvsroot=src&r1=1.2&r2=1.3
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdio/fdopen.c.diff?cvsroot=src&r1=1.6&r2=1.7
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdio64/fdopen64.c.diff?cvsroot=src&r1=1.2&r2=1.3
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdio64/fopen64.c.diff?cvsroot=src&r1=1.4&r2=1.5
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdio64/freopen64.c.diff?cvsroot=src&r1=1.3&r2=1.4



More information about the Newlib-cvs mailing list