summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/debug.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/debug.cc')
-rw-r--r--winsup/cygwin/debug.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc
index 077ccf088..6218312fe 100644
--- a/winsup/cygwin/debug.cc
+++ b/winsup/cygwin/debug.cc
@@ -47,6 +47,17 @@ regthread (const char *name, DWORD tid)
unlock_threadname ();
}
+int __stdcall
+iscygthread()
+{
+ DWORD tid = GetCurrentThreadId ();
+ if (tid != maintid)
+ for (DWORD i = 0; i < NTHREADS && threads[i].name != NULL; i++)
+ if (threads[i].id == tid)
+ return 1;
+ return 0;
+}
+
struct thread_start
{
LONG notavail;