summaryrefslogtreecommitdiff
path: root/libguile/threads.c
diff options
context:
space:
mode:
authorMichael Gran <spk121@yahoo.com>2011-03-29 21:27:54 -0700
committerAndy Wingo <wingo@pobox.com>2011-03-30 09:32:42 +0200
commit653ccd78fa6770c692f5a737ad70de5aedbfcc7f (patch)
tree64e7674d812176e99f3aefd0d7140744026fa64a /libguile/threads.c
parent4000d0641f8a2282a9c52eea33ad91c76625d906 (diff)
downloadguile-653ccd78fa6770c692f5a737ad70de5aedbfcc7f.tar.gz
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
Diffstat (limited to 'libguile/threads.c')
-rw-r--r--libguile/threads.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libguile/threads.c b/libguile/threads.c
index 8dc3414dc..d81f4f4ef 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;