* threads.h: Include null-threads.h when !USE_COOP_THREADS.
authorMarius Vollmer <mvo@zagadka.de>
Wed, 16 Oct 2002 15:57:13 +0000 (15:57 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Wed, 16 Oct 2002 15:57:13 +0000 (15:57 +0000)
* threads.c: Include null-threads.c when !USE_COOP_THREADS.
(scm_init_threads): Use generic type names scm_t_mutex and
scm_t_coop instead of coop_m and coop_t.

libguile/threads.c
libguile/threads.h

index e06d740..dcd91af 100644 (file)
@@ -133,6 +133,8 @@ SCM_REGISTER_PROC(s_signal_condition_variable, "signal-condition-variable", 1, 0
 
 #ifdef USE_COOP_THREADS
 #include "libguile/coop-threads.c"
+#else
+#include "libguile/null-threads.c"
 #endif
 
 \f
@@ -141,8 +143,9 @@ void
 scm_init_threads (SCM_STACKITEM *i)
 {
   scm_tc16_thread = scm_make_smob_type ("thread", 0);
-  scm_tc16_mutex = scm_make_smob_type ("mutex", sizeof (coop_m));
-  scm_tc16_condvar = scm_make_smob_type ("condition-variable", sizeof (coop_c));
+  scm_tc16_mutex = scm_make_smob_type ("mutex", sizeof (scm_t_mutex));
+  scm_tc16_condvar = scm_make_smob_type ("condition-variable",
+                                        sizeof (scm_t_condvar));
                                         
 #include "libguile/threads.x"
   /* Initialize implementation specific details of the threads support */
index e4106b2..c6a6630 100644 (file)
@@ -108,6 +108,8 @@ SCM_API scm_root_state *scm_i_thread_root (SCM thread);
 
 #ifdef USE_COOP_THREADS
 #include "libguile/coop-defs.h"
+#else
+#include "libguile/null-threads.h"
 #endif
 
 #endif  /* SCM_THREADS_H */