Author: miguel
Date: 2005-05-02 18:41:21 -0400 (Mon, 02 May 2005)
New Revision: 43905
Modified:
trunk/mono/libgc/ChangeLog
trunk/mono/libgc/pthread_stop_world.c
Log:
2005-05-02 Miguel de Icaza <[EMAIL PROTECTED]>
* pthread_stop_world.c (GC_restart_handler, GC_suspend_handler):
Wrap the original routines into methods that preserve the value of
errno. Fixes #74740
Modified: trunk/mono/libgc/ChangeLog
===================================================================
--- trunk/mono/libgc/ChangeLog 2005-05-02 21:10:49 UTC (rev 43904)
+++ trunk/mono/libgc/ChangeLog 2005-05-02 22:41:21 UTC (rev 43905)
@@ -1,3 +1,9 @@
+2005-05-02 Miguel de Icaza <[EMAIL PROTECTED]>
+
+ * pthread_stop_world.c (GC_restart_handler, GC_suspend_handler):
+ Wrap the original routines into methods that preserve the value of
+ errno. Fixes #74740
+
2005-04-18 Zoltan Varga <[EMAIL PROTECTED]>
* configure.in: Applied another freebsd patch from Bill Middleton
([EMAIL PROTECTED]).
Modified: trunk/mono/libgc/pthread_stop_world.c
===================================================================
--- trunk/mono/libgc/pthread_stop_world.c 2005-05-02 21:10:49 UTC (rev
43904)
+++ trunk/mono/libgc/pthread_stop_world.c 2005-05-02 22:41:21 UTC (rev
43905)
@@ -101,7 +101,7 @@
sem_t GC_suspend_ack_sem;
-void GC_suspend_handler(int sig)
+static void _GC_suspend_handler(int sig)
{
int dummy;
pthread_t my_thread = pthread_self();
@@ -168,8 +168,15 @@
#endif
}
-void GC_restart_handler(int sig)
+void GC_suspend_handler(int sig)
{
+ int old_errno = errno;
+ _GC_suspend_handler(sig);
+ errno = old_errno;
+}
+
+static void _GC_restart_handler(int sig)
+{
pthread_t my_thread = pthread_self();
GC_thread me;
@@ -270,6 +277,13 @@
ABORT("Collecting from unknown thread.");
}
+void GC_restart_handler(int sig)
+{
+ int old_errno = errno;
+ _GC_restart_handler (sig);
+ errno = old_errno;
+}
+
/* We hold allocation lock. Should do exactly the right thing if the */
/* world is stopped. Should not fail if it isn't. */
void GC_push_all_stacks()
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches