summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/cygthread.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc
index 4ed0d52cf..f7df503aa 100644
--- a/winsup/cygwin/cygthread.cc
+++ b/winsup/cygwin/cygthread.cc
@@ -149,9 +149,10 @@ new (size_t)
goto out;
}
else if (info->id)
- InterlockedExchange ((LPLONG) &info->avail, 0);
+ InterlockedExchange ((LPLONG) &info->avail, 0); /* Not available yet */
else
{
+ /* Available as soon as thread is created */
info->h = CreateThread (&sec_none_nih, 0, cygthread::stub, info,
CREATE_SUSPENDED, &info->id);
goto out;