guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. v2.1.0-265-ga722bca


From: Ken Raeburn
Subject: [Guile-commits] GNU Guile branch, master, updated. v2.1.0-265-ga722bca
Date: Mon, 21 May 2012 03:13:34 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=a722bcaa13acd3185e8e7b84f64cb614a46f3532

The branch, master has been updated
       via  a722bcaa13acd3185e8e7b84f64cb614a46f3532 (commit)
      from  730af462c387ce9cca30e84b8963edba10399d2e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a722bcaa13acd3185e8e7b84f64cb614a46f3532
Author: Ken Raeburn <address@hidden>
Date:   Sun May 20 05:22:01 2012 -0400

    Fix lock handling bug in commit aac980de43a0466b968a56607664f5ebbca6b751.
    
    * libguile/weak-set.c (resize_set): When releasing a lock temporarily to do
      an allocation, re-lock it afterwards, instead of unlocking again.
    * libguile/weak-table.c (resize_table): Likewise.

-----------------------------------------------------------------------

Summary of changes:
 libguile/weak-set.c   |    2 +-
 libguile/weak-table.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libguile/weak-set.c b/libguile/weak-set.c
index bdabedf..33402b5 100644
--- a/libguile/weak-set.c
+++ b/libguile/weak-set.c
@@ -362,7 +362,7 @@ resize_set (scm_t_weak_set *set)
          run anything, so drop our lock to avoid deadlocks.  */
       new_entries = scm_gc_malloc_pointerless (new_size * 
sizeof(scm_t_weak_entry),
                                                "weak set");
-      scm_i_pthread_mutex_unlock (&set->lock);
+      scm_i_pthread_mutex_lock (&set->lock);
     }
   while (!is_acceptable_size_index (set, new_size_index));
 
diff --git a/libguile/weak-table.c b/libguile/weak-table.c
index 6a3fecd..be73e1b 100644
--- a/libguile/weak-table.c
+++ b/libguile/weak-table.c
@@ -484,7 +484,7 @@ resize_table (scm_t_weak_table *table)
       /* Allocating memory might cause finalizers to run, which could
          run anything, so drop our lock to avoid deadlocks.  */
       new_entries = allocate_entries (new_size, table->kind);
-      scm_i_pthread_mutex_unlock (&table->lock);
+      scm_i_pthread_mutex_lock (&table->lock);
     }
   while (!is_acceptable_size_index (table, new_size_index));
 


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]