guile-devel
[Top][All Lists]
Advanced

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

[PATCH]: Critical section checked for incorrect thread.


From: Linas Vepstas
Subject: [PATCH]: Critical section checked for incorrect thread.
Date: Sat, 13 Dec 2008 17:39:08 -0600

The patch below was previously submitted:
http://www.mail-archive.com/address@hidden/msg04618.html
but was never applied, I don't know why; there was no
'yea' or 'nay' response.  Please apply; this provides at
least some stability for multi-threaded operation.

--linas

At any given time, some thread might be in a critical section.
Some other thread may be throwing an error for some utterly
unrelated reason.  Yet, when the error is thrown, the
"critical section" check will trip, and it will do so for an
utterly bogus reason. This patch performs the critical section
check, for only for the current thread.

Signed-off-by: Linas Vepstas <address@hidden>

---
 libguile/throw.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: guile-1.8.6/libguile/throw.c
===================================================================
--- guile-1.8.6.orig/libguile/throw.c  2008-12-08 11:42:56.000000000 -0600
+++ guile-1.8.6/libguile/throw.c 2008-12-13 17:28:27.000000000 -0600
@@ -692,7 +692,7 @@ scm_ithrow (SCM key, SCM args, int noret
   SCM dynpair = SCM_UNDEFINED;
   SCM winds;

-  if (scm_i_critical_section_level)
+  if (SCM_I_CURRENT_THREAD->block_asyncs)
     {
       fprintf (stderr, "throw from within critical section.\n");
       abort ();

Attachment: crit-section.patch
Description: Text Data


reply via email to

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