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>2000-10-19 21:57:28 +0400
committerChristopher Faylor <me@cgf.cx>2000-10-19 21:57:28 +0400
commit167095f6c0e99025764ea231f11b58c0b9f2685d (patch)
treef6a38daafbd77074054d95430ec5716eb0df8e6a /winsup/cygwin
parent2556e737ec044e39cd8afc6f00cd0f156b9d6ede (diff)
* dcrt0.cc (sigthread::init): Correct overzealous ifdef.
* exceptions.cc (call_handler): Avoid calling sigthread acquire lock. * sigproc.h (sigthread): Comment out lock for now. * sync.cc (muto::acquire): Add a minor optimization.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/dcrt0.cc2
-rw-r--r--winsup/cygwin/exceptions.cc10
-rw-r--r--winsup/cygwin/sigproc.h2
-rw-r--r--winsup/cygwin/sync.cc3
5 files changed, 22 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index d0b40a1c7..3aee9dfd4 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+Thu Oct 19 13:55:31 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * dcrt0.cc (sigthread::init): Correct overzealous ifdef.
+ * exceptions.cc (call_handler): Avoid calling sigthread acquire lock.
+ * sigproc.h (sigthread): Comment out lock for now.
+ * sync.cc (muto::acquire): Add a minor optimization.
+
2000-10-18 DJ Delorie <dj@redhat.com>
* Makefile.in: add miscfuncs.cc
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index fbf794721..c23f1dbc0 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -616,8 +616,8 @@ sigthread::init (const char *s)
{
#if 0 /* FIXME: Someday we'll need this for inter-thread signalling */
lock = new_muto (FALSE, s);
- id = GetCurrentThreadId ();
#endif
+ id = GetCurrentThreadId ();
}
/* Take over from libc's crt0.o and start the application. Note the
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index c4b87f0ec..0054b1a2c 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -709,7 +709,9 @@ call_handler (int sig, struct sigaction& siga, void *handler)
int res;
int using_mainthread_frame;
+#if 0
mainthread.lock->acquire ();
+#endif
if (sigsave.sig)
goto set_pending;
@@ -723,7 +725,9 @@ call_handler (int sig, struct sigaction& siga, void *handler)
{
int i;
using_mainthread_frame = 0;
+#if 0
mainthread.lock->release ();
+#endif
hth = myself->getthread2signal ();
/* Suspend the thread which will receive the signal. But first ensure that
@@ -747,14 +751,18 @@ call_handler (int sig, struct sigaction& siga, void *handler)
if (m->unstable () || m->owner () == mainthread.id)
goto owns_muto;
+#if 0
mainthread.lock->acquire ();
+#endif
if (mainthread.frame)
{
ebp = mainthread.frame; /* try to avoid a race */
using_mainthread_frame = 1;
goto next;
}
+#if 0
mainthread.lock->release ();
+#endif
cx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
if (!GetThreadContext (hth, &cx))
@@ -816,7 +824,9 @@ out:
sigproc_printf ("ResumeThread returned %d", res);
}
+#if 0
mainthread.lock->release ();
+#endif
sigproc_printf ("returning %d", interrupted);
return interrupted;
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
index 2ee39b013..2fc623dc8 100644
--- a/winsup/cygwin/sigproc.h
+++ b/winsup/cygwin/sigproc.h
@@ -38,7 +38,9 @@ struct sigthread
{
DWORD id;
DWORD frame;
+#if 0
muto *lock; // FIXME: Use for multi-thread signalling someday
+#endif
void init (const char *s);
};
diff --git a/winsup/cygwin/sync.cc b/winsup/cygwin/sync.cc
index 86bcc0440..5aa798e69 100644
--- a/winsup/cygwin/sync.cc
+++ b/winsup/cygwin/sync.cc
@@ -87,7 +87,7 @@ muto::acquire (DWORD ms)
switch (WaitForSingleObject (bruteforce, ms))
{
case WAIT_OBJECT_0:
- was_waiting = 0;
+ goto gotit;
break;
default:
InterlockedDecrement (&waiters);
@@ -96,6 +96,7 @@ muto::acquire (DWORD ms)
}
}
+gotit:
tid = this_tid; /* register this thread. */
return ++visits; /* Increment visit count. */
}