63 |
SCM_API void scm_init_threads (SCM_STACKITEM *); |
SCM_API void scm_init_threads (SCM_STACKITEM *); |
64 |
SCM_API void scm_init_thread_procs (void); |
SCM_API void scm_init_thread_procs (void); |
65 |
|
|
66 |
|
#if SCM_USE_PTHREAD_THREADS |
67 |
|
# include "libguile/pthread-threads.h" |
68 |
|
#else |
69 |
|
# include "libguile/null-threads.h" |
70 |
|
#endif |
71 |
|
|
72 |
/*----------------------------------------------------------------------*/ |
/*----------------------------------------------------------------------*/ |
73 |
/* Low-level C API */ |
/* Low-level C API */ |
74 |
|
|
136 |
|
|
137 |
#define scm_key_create scm_i_plugin_key_create |
#define scm_key_create scm_i_plugin_key_create |
138 |
#define scm_key_delete scm_i_plugin_key_delete |
#define scm_key_delete scm_i_plugin_key_delete |
139 |
#define scm_setspecific scm_i_plugin_setspecific |
SCM_API int scm_setspecific (scm_t_key k, void *s); |
140 |
#define scm_getspecific scm_i_plugin_getspecific |
SCM_API void *scm_getspecific (scm_t_key k); |
141 |
|
|
142 |
#define scm_thread_select scm_internal_select |
#define scm_thread_select scm_internal_select |
143 |
|
|
230 |
|
|
231 |
SCM_API scm_root_state *scm_i_thread_root (SCM thread); |
SCM_API scm_root_state *scm_i_thread_root (SCM thread); |
232 |
|
|
|
#if SCM_USE_PTHREAD_THREADS |
|
|
# include "libguile/pthread-threads.h" |
|
|
#else |
|
|
# include "libguile/null-threads.h" |
|
|
#endif |
|
|
|
|
233 |
#define SCM_CURRENT_THREAD \ |
#define SCM_CURRENT_THREAD \ |
234 |
((scm_thread *) scm_i_plugin_getspecific (scm_i_thread_key)) |
((scm_thread *) scm_i_plugin_getspecific (scm_i_thread_key)) |
235 |
extern scm_t_key scm_i_thread_key; |
extern scm_t_key scm_i_thread_key; |
236 |
|
|
237 |
/* These macros have confusing names. |
/* These macros have confusing names. |
238 |
They really refer to the root state of the running thread. */ |
They really refer to the root state of the running thread. */ |
239 |
#define SCM_THREAD_LOCAL_DATA (scm_i_plugin_getspecific (scm_i_root_state_key)) |
#define SCM_THREAD_LOCAL_DATA (scm_getspecific (scm_i_root_state_key)) |
240 |
#define SCM_SET_THREAD_LOCAL_DATA(x) scm_i_set_thread_data(x) |
#define SCM_SET_THREAD_LOCAL_DATA(x) scm_i_set_thread_data(x) |
241 |
SCM_API scm_t_key scm_i_root_state_key; |
SCM_API scm_t_key scm_i_root_state_key; |
242 |
SCM_API void scm_i_set_thread_data (void *); |
SCM_API void scm_i_set_thread_data (void *); |