* dcrt0.cc (alloc_stack): Move _main_tls if stack is relocated.
This commit is contained in:
parent
c76d70d7c0
commit
fac0681d6c
|
@ -1,3 +1,7 @@
|
||||||
|
2003-12-12 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* dcrt0.cc (alloc_stack): Move _main_tls if stack is relocated.
|
||||||
|
|
||||||
2003-12-11 Christopher Faylor <cgf@redhat.com>
|
2003-12-11 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* miscfuncs.cc (low_priority_sleep): Correct thinko which caused
|
* miscfuncs.cc (low_priority_sleep): Correct thinko which caused
|
||||||
|
|
|
@ -54,6 +54,16 @@ bool strip_title_path;
|
||||||
bool allow_glob = true;
|
bool allow_glob = true;
|
||||||
codepage_type current_codepage = ansi_cp;
|
codepage_type current_codepage = ansi_cp;
|
||||||
|
|
||||||
|
static NO_COPY int mypid = 0;
|
||||||
|
int __argc_safe;
|
||||||
|
int _declspec(dllexport) __argc;
|
||||||
|
char _declspec(dllexport) **__argv;
|
||||||
|
vfork_save NO_COPY *main_vfork = NULL;
|
||||||
|
|
||||||
|
extern "C" void __sinit (_reent *);
|
||||||
|
|
||||||
|
_threadinfo NO_COPY *_main_tls;
|
||||||
|
|
||||||
int cygwin_finished_initializing;
|
int cygwin_finished_initializing;
|
||||||
|
|
||||||
/* Used in SIGTOMASK for generating a bit for insertion into a sigset_t.
|
/* Used in SIGTOMASK for generating a bit for insertion into a sigset_t.
|
||||||
|
@ -507,24 +517,18 @@ alloc_stack (child_info_fork *ci)
|
||||||
if (!VirtualQuery ((LPCVOID) &b, &sm, sizeof sm))
|
if (!VirtualQuery ((LPCVOID) &b, &sm, sizeof sm))
|
||||||
api_fatal ("fork: couldn't get stack info, %E");
|
api_fatal ("fork: couldn't get stack info, %E");
|
||||||
|
|
||||||
if (sm.AllocationBase != ci->stacktop)
|
if (sm.AllocationBase == ci->stacktop)
|
||||||
alloc_stack_hard_way (ci, b + sizeof (b) - 1);
|
|
||||||
else
|
|
||||||
ci->stacksize = 0;
|
ci->stacksize = 0;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alloc_stack_hard_way (ci, b + sizeof (b) - 1);
|
||||||
|
_main_tls = &_my_tls;
|
||||||
|
_main_tls->init_thread (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static NO_COPY int mypid = 0;
|
|
||||||
int __argc_safe;
|
|
||||||
int _declspec(dllexport) __argc;
|
|
||||||
char _declspec(dllexport) **__argv;
|
|
||||||
vfork_save NO_COPY *main_vfork = NULL;
|
|
||||||
|
|
||||||
extern "C" void __sinit (_reent *);
|
|
||||||
|
|
||||||
_threadinfo NO_COPY *_main_tls;
|
|
||||||
|
|
||||||
/* Take over from libc's crt0.o and start the application. Note the
|
/* Take over from libc's crt0.o and start the application. Note the
|
||||||
various special cases when Cygwin DLL is being runtime loaded (as
|
various special cases when Cygwin DLL is being runtime loaded (as
|
||||||
opposed to being link-time loaded by Cygwin apps) from a non
|
opposed to being link-time loaded by Cygwin apps) from a non
|
||||||
|
|
Loading…
Reference in New Issue