Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 42fed831f..8d4d72dd7 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -33,6 +33,7 @@ details. */
#include "shared_info.h"
#include "cygwin_version.h"
#include "dll_init.h"
+#include "cygthread.h"
#include "cygwin/cygserver_transport.h"
#include "cygwin/cygserver.h"
@@ -40,8 +41,8 @@ details. */
#define PREMAIN_LEN (sizeof (user_data->premain) / sizeof (user_data->premain[0]))
-HANDLE NO_COPY hMainProc = NULL;
-HANDLE NO_COPY hMainThread = NULL;
+HANDLE NO_COPY hMainProc;
+HANDLE NO_COPY hMainThread;
sigthread NO_COPY mainthread; // ID of the main thread
@@ -571,10 +572,8 @@ dll_crt0_1 ()
user_data->resourcelocks->Init ();
user_data->threadinterface->Init (user_data->forkee);
- threadname_init ();
(void) getpagesize (); /* initialize page size constant */
- regthread ("main", GetCurrentThreadId ());
mainthread.init ("mainthread"); // For use in determining if signals
// should be blocked.
@@ -632,6 +631,7 @@ dll_crt0_1 ()
/* Initialize the cygwin subsystem if this is the first process,
or attach to shared data structures if it's already running. */
memory_init ();
+ cygthread::init ();
ProtectHandle (hMainProc);
ProtectHandle (hMainThread);