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

Re: (patch) enable signals in dynamically loaded Cygwin DLL


On Mon, Dec 06, 1999 at 09:51:31PM -0600, Mumit Khan wrote:
>Completely forgot about the synchronization used in makethread to avoid
>stack corruption, and that's why enabling signals for dynamically loaded
>Cygwin was crashing in newly created threads.
>
>This change removes the synchronization and uses dynamically allocated
>memory to the thread stub routine, which frees the memory. The overhead
>should be roughly the same, perhaps a tiny bit higher due to malloc's
>internal MT synchronization.
>
>A gotcha for future users of makethread -- if you pass a thread parameter,
>make sure it's not on the stack (which is the case currently, so it should
>be safe). 

Note that this probably affects tty initialization too.  It's not just
signals that are affected, it's any thread that is started during DLL
initialization.  Since CYGWIN=tty implies the creation of several runtime
threads, I assume that the problem is manifested there as well.

cgf

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