[PATCH] MTinterface patch part 2

Thomas Pfaff tpfaff@gmx.net
Tue Sep 24 03:44:00 GMT 2002


This is patch 2 of 3 for MTinterface.

It will convert the TLS handling for reents and thread self pointer to use
the fork save pthread keys. This is important for forks from threads other
than the main thread.

2002-09-24  Thomas Pfaff  <tpfaff@gmx.net>

	* init.cc (dll_entry): Change reents initialization.
	* thread.cc (MT_INTERFACE): Move to "thread.h".
	(_reent_clib): Use new reents handling.
	(_reent_winsup): Ditto.
	(MTinterface::Init): Remove member variables initialization.
	They are now initialized via constructor. Initialize TLS only
	when process is not forked.
	(MTinterface::doInit): Implement. Initialize TLS for reents and
	thread self pointer.
	(MTinterface::fixup_after_fork); Reset threadcount to 1.
	Initialize thread self pointer.
	(pthread::self): Rename temp to thread. Initialize thread self
	pointer if uninitialized.
	(pthread::setTlsSelfPointer): Use new thread self handling.
	(pthread::thread_init_wrapper): Use new reents handling.
	* thread.h (MTinterface::reent_index): Remove.
	(MTinterface::thread_self_dwTlsIndex): Ditto.
	(MTinterface::indexallocated): Ditto.
	(MTinterface::reent_key): New member.
	(MTinterface::thread_self_key): Ditto.
	(MTinterface::MTinterface): Initialize all members.
	(MT_INTERFACE): Move from "thread.cc".




-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mtinterface2.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020924/2101bd3d/attachment.ksh>


More information about the Cygwin-patches mailing list