Changes from arch/CVS synchronization
authorLudovic Courtès <ludo@gnu.org>
Tue, 2 Oct 2007 16:06:25 +0000 (16:06 +0000)
committerLudovic Courtès <ludo@gnu.org>
Tue, 2 Oct 2007 16:06:25 +0000 (16:06 +0000)
ChangeLog
NEWS
libguile/ChangeLog
libguile/threads.c

index 3edbcf5..18f16fd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 2007-10-02  Ludovic Courtès  <ludo@gnu.org>
 
-       * NEWS: Mention `(ice-9 slib)' fix.
+       * NEWS: Mention `(ice-9 slib)' fix and threading fix.
 
 2007-09-03  Ludovic Courtès  <ludo@gnu.org>
 
diff --git a/NEWS b/NEWS
index 889e78b..e4fbb14 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -46,6 +46,7 @@ Changes in 1.8.3 (since 1.8.2)
 ** Warnings about duplicate bindings now go to stderr
 ** A memory leak in `make-socket-address' was fixed
 ** Alignment issues (e.g., on SPARC) in network routines were fixed
+** A threading issue that showed up at least on NetBSD was fixed
 ** Build problems on Solaris fixed
 
 * Implementation improvements
index 4d0fe36..f3dd1c5 100644 (file)
@@ -1,3 +1,9 @@
+2007-10-02  Ludovic Courtès  <ludo@gnu.org>
+
+       * threads.c (on_thread_exit): Don't call `scm_leave_guile ()'
+       since we're already in non-guile mode.  Reported by Greg Toxel
+       for NetBSD.
+
 2007-10-01  Ludovic Courtès  <ludo@gnu.org>
 
        * ports.c (flush_output_port): Expect directly a port instead of
index 7e1bfde..858a1eb 100644 (file)
@@ -495,20 +495,18 @@ do_thread_exit (void *v)
 static void
 on_thread_exit (void *v)
 {
+  /* This handler is executed in non-guile mode.  */
   scm_i_thread *t = (scm_i_thread *)v, **tp;
 
   scm_i_pthread_setspecific (scm_i_thread_key, v);
 
   /* Unblocking the joining threads needs to happen in guile mode
-     since the queue is a SCM data structure.
-  */
+     since the queue is a SCM data structure.  */
   scm_with_guile (do_thread_exit, v);
 
   /* Removing ourself from the list of all threads needs to happen in
      non-guile mode since all SCM values on our stack become
-     unprotected once we are no longer in the list.
-  */
-  scm_leave_guile ();
+     unprotected once we are no longer in the list.  */
   scm_i_pthread_mutex_lock (&thread_admin_mutex);
   for (tp = &all_threads; *tp; tp = &(*tp)->next_thread)
     if (*tp == t)