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:
authorChristopher Faylor <me@cgf.cx>2005-06-10 03:48:08 +0400
committerChristopher Faylor <me@cgf.cx>2005-06-10 03:48:08 +0400
commit1b96f7da4592061bffad3e45181b3fd381c40079 (patch)
tree2463fa3480b4f1c250e9d62531946e9f82f1ecf5
parent9a9177720555953b8761b8f22ef7f5566db0955f (diff)
* cygthread.cc (cygthread::detach): Improve diagnostics for what should be an
impossible failure condition.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/cygthread.cc15
2 files changed, 19 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f6c06b925..799e17446 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2005-06-09 Christopher Faylor <cgf@timesys.com>
+ * cygthread.cc (cygthread::detach): Improve diagnostics for what should
+ be an impossible failure condition.
+
+2005-06-09 Christopher Faylor <cgf@timesys.com>
+
* cygtls.h (_local_storage::setmode_file): New element.
(_local_storage::setmode_mode): New element.
* tlsoffsets.h: Regenerate.
diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc
index af60abf2a..896086834 100644
--- a/winsup/cygwin/cygthread.cc
+++ b/winsup/cygwin/cygthread.cc
@@ -344,7 +344,20 @@ cygthread::detach (HANDLE sigwait)
break;
default:
if (!exiting)
- api_fatal ("WFMO failed waiting for cygthread '%s', %E", __name);
+ {
+ system_printf ("WFMO failed waiting for cygthread '%s', %E", __name);
+ for (unsigned j = 0; j < n; j++)
+ switch (WaitForSingleObject (w4[j], 0))
+ {
+ case WAIT_OBJECT_0:
+ case WAIT_TIMEOUT:
+ break;
+ default:
+ system_printf ("%s handle %p is bad", j ? "semaphore" : "signal_arrived", w4[j]);
+ break;
+ }
+ api_fatal ("exiting on fatal error");
+ }
break;
}
/* WAIT_OBJECT_0 means that the thread successfully read something,