summaryrefslogtreecommitdiff
path: root/libguile/coop-pthreads.h
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2002-11-02 01:02:35 +0000
committerMarius Vollmer <mvo@zagadka.de>2002-11-02 01:02:35 +0000
commit0019d6a19dc2967e8d6f0d5c376abfd445f482f2 (patch)
tree07758a77c3a1cabefad2ae20c3566bc216e0e090 /libguile/coop-pthreads.h
parentcfe062d097faa6073da27830430648276740bb1c (diff)
downloadguile-0019d6a19dc2967e8d6f0d5c376abfd445f482f2.tar.gz
Redone completely, you might start testing it now.
Diffstat (limited to 'libguile/coop-pthreads.h')
-rw-r--r--libguile/coop-pthreads.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/libguile/coop-pthreads.h b/libguile/coop-pthreads.h
index 1f38a9464..87b175d7f 100644
--- a/libguile/coop-pthreads.h
+++ b/libguile/coop-pthreads.h
@@ -46,9 +46,9 @@
-/* The coop-pthreads implementation. We provide implement threads,
- mutices and condition variables using the pthread ones, but only
- one thread can ever be active inside Guile at any one time.
+/* The coop-pthreads implementation. We use pthreads for the basic
+ multi threading stuff, but rig it so that only one thread is ever
+ active inside Guile.
*/
#include <pthread.h>
@@ -61,25 +61,25 @@
#define SCM_CRITICAL_SECTION_START
#define SCM_CRITICAL_SECTION_END
-#define SCM_THREAD_SWITCH_COUNT 50
+#define SCM_I_THREAD_SWITCH_COUNT 50
#define SCM_THREAD_SWITCHING_CODE \
do { \
- scm_switch_counter--; \
- if (scm_switch_counter == 0) \
+ scm_i_switch_counter--; \
+ if (scm_i_switch_counter == 0) \
{ \
- scm_switch_counter = SCM_THREAD_SWITCH_COUNT; \
+ scm_i_switch_counter = SCM_I_THREAD_SWITCH_COUNT; \
scm_yield(); \
} \
} while (0)
-SCM_API int scm_switch_counter;
+SCM_API int scm_i_switch_counter;
-#define SCM_THREAD_LOCAL_DATA (scm_copt_thread_data ())
-#define SCM_SET_THREAD_LOCAL_DATA(ptr) (scm_copt_set_thread_data (ptr))
+#define SCM_THREAD_LOCAL_DATA (scm_i_copt_thread_data)
+#define SCM_SET_THREAD_LOCAL_DATA(ptr) (scm_i_copt_set_thread_data (ptr))
-SCM_API void *scm_copt_thread_data (void);
-SCM_API void scm_copt_set_thread_data (void *);
+SCM_API void *scm_i_copt_thread_data;
+SCM_API void scm_i_copt_set_thread_data (void *data);
#endif /* SCM_COOP_PTHREAD_H */