guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-195-gdbab8


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-195-gdbab8aa
Date: Wed, 13 Mar 2013 10:02:48 +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=dbab8aaacaa7ce4d1d3db09d422615b6fcd6724f

The branch, stable-2.0 has been updated
       via  dbab8aaacaa7ce4d1d3db09d422615b6fcd6724f (commit)
      from  dfd1d3b144d97522b2a4e82dc583a43e0b4f8b93 (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 dbab8aaacaa7ce4d1d3db09d422615b6fcd6724f
Author: Andy Wingo <address@hidden>
Date:   Wed Mar 13 11:01:38 2013 +0100

    allow for spurious wakeups from pthread_cond_wait
    
    * libguile/threads.c (scm_call_with_new_thread, scm_spawn_thread): Allow
      for spurious wakeups while waiting on cond variables.  Should fix bug
      10641.

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

Summary of changes:
 libguile/threads.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/libguile/threads.c b/libguile/threads.c
index c1b9c39..04897e3 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -1,5 +1,5 @@
 /* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
- *   2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+ *   2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
  *   Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
@@ -1058,7 +1058,10 @@ SCM_DEFINE (scm_call_with_new_thread, 
"call-with-new-thread", 1, 1, 0,
       errno = err;
       scm_syserror (NULL);
     }
-  scm_i_scm_pthread_cond_wait (&data.cond, &data.mutex);
+
+  while (scm_is_false (data.thread))
+    scm_i_scm_pthread_cond_wait (&data.cond, &data.mutex);
+
   scm_i_pthread_mutex_unlock (&data.mutex);
 
   return data.thread;
@@ -1135,7 +1138,10 @@ scm_spawn_thread (scm_t_catch_body body, void *body_data,
       errno = err;
       scm_syserror (NULL);
     }
-  scm_i_scm_pthread_cond_wait (&data.cond, &data.mutex);
+
+  while (scm_is_false (data.thread))
+    scm_i_scm_pthread_cond_wait (&data.cond, &data.mutex);
+
   scm_i_pthread_mutex_unlock (&data.mutex);
 
   assert (SCM_I_IS_THREAD (data.thread));


hooks/post-receive
-- 
GNU Guile



reply via email to

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