* coop-pthreads.h: Added support for thread specific data to the
authorMikael Djurfeldt <djurfeldt@nada.kth.se>
Thu, 7 Nov 2002 14:35:08 +0000 (14:35 +0000)
committerMikael Djurfeldt <djurfeldt@nada.kth.se>
Thu, 7 Nov 2002 14:35:08 +0000 (14:35 +0000)
generic C API for the coop-pthreads case.

libguile/ChangeLog
libguile/coop-pthreads.h

index 5ebd503..cea46b1 100644 (file)
@@ -1,5 +1,8 @@
 2002-11-07  Mikael Djurfeldt  <mdj@linnaeus>
 
+       * coop-pthreads.h: Added support for thread specific data to the
+       generic C API for the coop-pthreads case.
+
        * threads.c, threads.h (scm_cond_init): Undo unintentional API
        change.
        (scm_cond_broadcast): Added missing function.
index 87b175d..62c34c7 100644 (file)
 
 #include <pthread.h>
 
+#if (SCM_ENABLE_DEPRECATED == 1)
+
+/* Thread local data support --- generic C API */
+
+typedef pthread_key_t scm_t_key;
+
+#define scm_key_create pthread_key_create
+#define scm_setspecific pthread_setspecific
+#define scm_getspecific pthread_getspecific
+#define scm_key_delete pthread_key_delete
+
+#endif /* SCM_ENABLE_DEPRECATED == 1 */
+
 /* Since only one thread can be active anyway, we don't need to do
    anything special around critical sections.  In fact, that's the
    reason we do only support cooperative threading: Guile's critical