* wincap.h (wincaps::has_buggy_thread_startup): Declare.

(wincapc::has_buggy_thread_startup): Ditto.
* wincap.cc::wincap_*): Accommodate has_buggy_thread_startup.
(wincapc::init): Explicitly turn off has_buggy_thread_startup if not WOW64.
* cygthread.h (cygthread::thread_handle): Declare/define new method.
* dcrt0.cc (_dll_crt0): Don't call __sinit here.
(dll_crt0_0): Don't call sigproc_init during initialization if
wincap.has_buggy_thread_startup().
(dll_crt0_1): Defer sigproc_init to here when
wincap.has_buggy_thread_startup().  Call __sinit after we've determined that
we're not forking.
(__main): Rework comments.  Add potential future reminder.
This commit is contained in:
Christopher Faylor
2010-09-19 20:18:36 +00:00
parent 392397f46c
commit b64733135a
5 changed files with 45 additions and 14 deletions

View File

@@ -60,6 +60,7 @@ wincaps wincap_unknown __attribute__((section (".cygwin_dll_common"), shared)) =
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:false,
has_buggy_thread_startup:false,
};
wincaps wincap_nt4 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -101,6 +102,7 @@ wincaps wincap_nt4 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:false,
has_buggy_thread_startup:false,
};
wincaps wincap_nt4sp4 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -142,6 +144,7 @@ wincaps wincap_nt4sp4 __attribute__((section (".cygwin_dll_common"), shared)) =
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:false,
has_buggy_thread_startup:false,
};
wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -183,6 +186,7 @@ wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:true,
has_buggy_thread_startup:false,
};
wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -224,6 +228,7 @@ wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) =
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:true,
has_buggy_thread_startup:false,
};
wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -265,6 +270,7 @@ wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = {
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:true,
has_buggy_thread_startup:false,
};
wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -306,6 +312,7 @@ wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:true,
has_buggy_thread_startup:false,
};
wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -347,6 +354,7 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:true,
has_buggy_thread_startup:false,
};
wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -388,6 +396,7 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_always_all_codepages:false,
has_localenames:false,
has_mwmo_inputavailable:true,
has_buggy_thread_startup:false,
};
wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -429,6 +438,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
has_always_all_codepages:true,
has_localenames:true,
has_mwmo_inputavailable:true,
has_buggy_thread_startup:true,
};
wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -470,6 +480,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_always_all_codepages:true,
has_localenames:true,
has_mwmo_inputavailable:true,
has_buggy_thread_startup:false,
};
wincapc wincap __attribute__((section (".cygwin_dll_common"), shared));
@@ -576,6 +587,8 @@ wincapc::init ()
((wincaps *)caps)->has_restricted_stack_args = false;
}
if (!wow64)
((wincaps *) caps)->has_buggy_thread_startup = false;
__small_sprintf (osnam, "NT-%d.%d", version.dwMajorVersion,
version.dwMinorVersion);
}