summaryrefslogtreecommitdiff
path: root/libguile/threads.c
diff options
context:
space:
mode:
authorMikael Djurfeldt <djurfeldt@nada.kth.se>2002-12-18 13:42:58 +0000
committerMikael Djurfeldt <djurfeldt@nada.kth.se>2002-12-18 13:42:58 +0000
commit29717c89316bb94c95a90107553a47f5ee5fb4e3 (patch)
tree0c049f90cb4023f7189cfdeb4a5124ba1a21cfc5 /libguile/threads.c
parent62d4fd94a6993ee521756c5ecebce0fcaed39779 (diff)
downloadguile-29717c89316bb94c95a90107553a47f5ee5fb4e3.tar.gz
* Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
(EXTRA_DIST): Added threads-plugin.c. * threads-plugin.h, threads-plugin.c: New files. * threads.h: #include "libguile/threads-plugin.h". * threads.c: #include "libguile/threads-plugin.c". * pthread-threads.c: Temporarily remove debugging functions. * threads.c, threads.h (scm_yield): Added back.
Diffstat (limited to 'libguile/threads.c')
-rw-r--r--libguile/threads.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libguile/threads.c b/libguile/threads.c
index 0d277c125..a717b13a0 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -460,6 +460,15 @@ SCM_DEFINE (scm_call_with_new_thread, "call-with-new-thread", 2, 0, 0,
}
#undef FUNC_NAME
+SCM_DEFINE (scm_yield, "yield", 0, 0, 0,
+ (),
+"Move the calling thread to the end of the scheduling queue.")
+#define FUNC_NAME s_scm_yield
+{
+ return SCM_BOOL (scm_thread_yield);
+}
+#undef FUNC_NAME
+
SCM_DEFINE (scm_join_thread, "join-thread", 1, 0, 0,
(SCM thread),
"Suspend execution of the calling thread until the target @var{thread} "
@@ -1312,6 +1321,7 @@ scm_t_rec_mutex scm_i_defer_mutex;
#ifdef USE_PTHREAD_THREADS
#include "libguile/pthread-threads.c"
#endif
+#include "libguile/threads-plugin.c"
/*** Initialization */