OSDN Git Service

* dcrt0.cc (child_info_fork::alloc_stack_hard_way): Change sense of guard test.
authorcgf <cgf>
Thu, 22 Feb 2007 12:34:53 +0000 (12:34 +0000)
committercgf <cgf>
Thu, 22 Feb 2007 12:34:53 +0000 (12:34 +0000)
commit670b1dfa92e20eca710fd7c84e3a7d605db9fab4
tree898f1132ed51ea4a9fae1114e9b0e113a2e9adef
parentfb45ae43c2b9fef262f5de6b06d83953b15f3ad0
* dcrt0.cc (child_info_fork::alloc_stack_hard_way): Change sense of guard test.
Increase size of stack reserved and increase size before the current stack
pointer.  Use pointers when doing arithmetic.
(dll_crt0_1): Initialize exception handler when we notice we're the child of a
fork from non-main thread.
* fork.cc (frok::parent): Make argument volatile.
(frok::child): Ditto.
(lock_signals): New class.
(lock_pthread): Ditto.
(hold_everhthing): Ditto.
(frok::parent): Move atforkprepare and atforkparent to lock_pthread class.
(fork): Make ischild boolean.  Use hold_everything variable within limited
scope to set various mutexes in such a way as to avoid deadlocks.
* thread.h (pthread_mutex::tid): New variable, active when debugging for
tracking thread id of owner.
(pthread_mutex::set_owner): Set tid when debugging.
* thread.cc (pthread_mutex::pthread_mutex): Clear tid.
(pthread_mutex::_unlock): Ditto when unlocking.
(pthread_mutex::fixup_after_fork): Set tid to special value after forking since
owner is unknown.
winsup/cygwin/ChangeLog
winsup/cygwin/dcrt0.cc
winsup/cygwin/fork.cc
winsup/cygwin/thread.cc
winsup/cygwin/thread.h