From 9aa07a8f6081b541dbe57f656bcfd430a7d2c9ae Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 24 Feb 2000 06:45:32 +0000 Subject: Fix final round of gcc warnings relating to unused parameters. * debug.cc (iscygthread): New function. * debug.h: Declare it. * exceptions.cc (set_process_mask): Flush pending signals. (handle_sigsuspend): No need to flush pending signals. (call_handler): Refine previous tests of muto ownership. Only clear wait()'s when we have definitely responded to a signal. * fhandler_console.cc (fhandler_console::read): Don't set EINTR if executing in a "cygwin" thread. * sigproc.cc (proc_subproc): Use second argument to control whether CLEARWAIT actually sets "signalled" flag. * sync.h (muto): Add 'unstable' method. --- winsup/cygwin/debug.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'winsup/cygwin/debug.cc') 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; -- cgit v1.2.3