This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Thread safe stdio


_flock_t is now defined in cygwin/_types.h. I will sent following patch for newlib when this one is applied:

--- _types.h.org	2004-01-26 23:33:11.000000000 +0100
+++ _types.h	2004-02-10 12:28:44.359443200 +0100
@@ -9,6 +9,10 @@
 #ifndef	_SYS__TYPES_H
 #define _SYS__TYPES_H

+#ifdef __CYGWIN__
+#include <cygwin/_types.h>
+#endif
+
 typedef long _off_t;
 __extension__ typedef long long _off64_t;

@@ -32,7 +36,9 @@ typedef struct
   } __value;		/* Value so far.  */
 } _mbstate_t;

+#ifndef __CYGWIN__
 typedef int _flock_t;
+#endif

 /* Iconv descriptor type */
 typedef void *_iconv_t;


The __sinit call must be done after malloc is initialized, otherwise the mutex creation will fail.


Thomas

2004-02-11 Thomas Pfaff <tpfaff@gmx.net>

	* include/cygwin/_types.h: New file.
	* include/sys/lock.h: Ditto.
	* include/sys/stdio.h: Ditto.
	* dcrt0.cc (dll_crt0_1): Add __sinit call after malloc
	initialization.
	(_dll_crt0): Remove __sinit call.
	* 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_unlock): Ditto.

Attachment: stdio.patch
Description: plain/text


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]