unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH 2/2] don't GC unregister null thread
@ 2011-03-30  5:03 Mike Gran
  0 siblings, 0 replies; only message in thread
From: Mike Gran @ 2011-03-30  5:03 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 392 bytes --]

Hi-

(First attempt at sending returned an error, so I hope this isn't a double-post.)
 
GC_unregister_my_thread is only supposed to be called from
a thread other than the main thread, so, it should never be
called when the system is compiled with null threads.

* libguile/threads.c (on_thread_exit)[SCM_USE_NULL_THREADS]: don't
    call GC_unregister_my_thread

Thanks,

Mike

[-- Attachment #2: 0002-don-t-GC-unregister-null-thread.patch --]
[-- Type: application/octet-stream, Size: 956 bytes --]

From b205bcc536a9f9d4e7a4ac376c2e1dc6ffe3b0a8 Mon Sep 17 00:00:00 2001
From: Michael Gran <spk121@yahoo.com>
Date: Tue, 29 Mar 2011 21:27:54 -0700
Subject: [PATCH 2/2] don't GC unregister null thread

GC_unregister_my_thread is only supposed to be called from
a thread other than the main thread, so, it should never be
called when the system is compiled with null threads.

* libguile/threads.c (on_thread_exit)[SCM_USE_NULL_THREADS]: don't
    call GC_unregister_my_thread
---
 libguile/threads.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libguile/threads.c b/libguile/threads.c
index 764fe1c..c791199 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -720,7 +720,9 @@ on_thread_exit (void *v)
 
   scm_i_pthread_setspecific (scm_i_thread_key, NULL);
 
+#if !SCM_USE_NULL_THREADS
   GC_unregister_my_thread ();
+#endif
 }
 
 static scm_i_pthread_once_t init_thread_key_once = SCM_I_PTHREAD_ONCE_INIT;
-- 
1.7.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-30  5:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-30  5:03 [PATCH 2/2] don't GC unregister null thread Mike Gran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).