+2005-05-02 Miguel de Icaza <miguel@novell.com>
+
+ * 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 <vargaz@freemail.hu>
* configure.in: Applied another freebsd patch from Bill Middleton (flashdict@gmail.com).
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();
#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;
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()