This is the mail archive of the cygwin-developers@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]

dll_entry [was Re: fork expert needed: (was .....])


----- Original Message -----
From: "Christopher Faylor" <cgf@redhat.com>
>
> > Robert Collins wrote:
> >Also while MSDN states that only one thread at a time can call the
> >entry point function, it does not state or imply that other threads are
> >suspended during that process.
>
> Ok, I reluctantly stand corrected.  I thought that both the MSDN and
> my own personal experience (waiting for a signal from Cygwi's signal
> thread that never arrived) said this.  I couldn't find any reference
> to this, though.

Moved thread  location.....

The system serializes calls to the dll entry point function and "it
suspends" the other related threads during the process.
(Jeffery Richer - Microsoft Press)

The attached patch can avoid the bottleneck but it may introduce new/old
problems.

Part of the patch is a reversal of a previous patch
http://sources.redhat.com/ml/cygwin-cvs/2000-q2/msg00041.html
What was the purpose of this patch?

Calling DisableThreadLibraryCalls could provide a cheap performance boost by
telling the system to not send DLL_THREAD_ATTACH and DLL_THREAD_DETACH
notifications to dll_entry when creating and destroying threads.

Any thoughts / has it been tried before / a bad idea ?

Regards Trevor




dll-init.patch

dll-init.ChangeLog


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