See ChangeLog from 2005-03-02.
[bpt/guile.git] / libguile / gc.h
index 5488884..4cb78a7 100644 (file)
 #include "libguile/__scm.h"
 
 #include "libguile/hooks.h"
-
-#if SCM_USE_PTHREAD_THREADS
-# include "libguile/pthread-threads.h"
-#else
-# include "libguile/null-threads.h"
-#endif
+#include "libguile/threads.h"
 
 \f
 
@@ -230,12 +225,12 @@ SCM_API int scm_debug_cells_gc_interval ;
 void scm_i_expensive_validation_check (SCM cell);
 #endif
 
-SCM_API scm_t_mutex scm_i_gc_admin_mutex;
+SCM_API scm_i_pthread_mutex_t scm_i_gc_admin_mutex;
 
 SCM_API int scm_block_gc;
 SCM_API int scm_gc_heap_lock;
 SCM_API unsigned int scm_gc_running_p;
-SCM_API scm_t_rec_mutex scm_i_sweep_mutex;
+SCM_API scm_i_pthread_mutex_t scm_i_sweep_mutex;
 \f
 
 #if (SCM_ENABLE_DEPRECATED == 1)
@@ -255,13 +250,10 @@ SCM_API size_t scm_default_max_segment_size;
 
 SCM_API size_t scm_max_segment_size;
 
-#define SCM_FREELIST_CREATE(key)               \
-  do { SCM *ls = (SCM *) malloc (sizeof (SCM));        \
-       *ls = SCM_EOL;                          \
-       scm_setspecific ((key), ls); } while (0)
-#define SCM_FREELIST_LOC(key) ((SCM *) scm_getspecific (key))
-SCM_API scm_t_key scm_i_freelist;
-SCM_API scm_t_key scm_i_freelist2;
+#define SCM_SET_FREELIST_LOC(key,ptr) scm_i_pthread_setspecific ((key), (ptr))
+#define SCM_FREELIST_LOC(key) ((SCM *) scm_i_pthread_getspecific (key))
+SCM_API scm_i_pthread_key_t scm_i_freelist;
+SCM_API scm_i_pthread_key_t scm_i_freelist2;
 SCM_API struct scm_t_cell_type_statistics scm_i_master_freelist;
 SCM_API struct scm_t_cell_type_statistics scm_i_master_freelist2;