summaryrefslogtreecommitdiff
path: root/libguile/threads.c
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-09-30 03:50:47 -0400
committerMark H Weaver <mhw@netris.org>2014-09-30 03:50:47 -0400
commit856d318a9f543d8a61fcf61caae7d07102586802 (patch)
tree10bd99500c027bbd472253f6cc34f8b1b516d4a1 /libguile/threads.c
parentf7582f9807d9a10fba86f54c4aeaa7444c51a315 (diff)
parent3157d455039f137ca5dfa8b9fbc4a3404ce00606 (diff)
downloadguile-856d318a9f543d8a61fcf61caae7d07102586802.tar.gz
Merge branch 'stable-2.0'
Conflicts: benchmark-suite/benchmarks/ports.bm libguile/async.h libguile/bytevectors.c libguile/foreign.c libguile/gsubr.c libguile/srfi-1.c libguile/vm-engine.h libguile/vm-i-scheme.c module/Makefile.am module/language/tree-il/analyze.scm module/language/tree-il/peval.scm module/scripts/compile.scm module/scripts/disassemble.scm test-suite/tests/asm-to-bytecode.test test-suite/tests/peval.test test-suite/tests/rdelim.test
Diffstat (limited to 'libguile/threads.c')
-rw-r--r--libguile/threads.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libguile/threads.c b/libguile/threads.c
index bcf1e0d63..3dc0f40c3 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -1036,6 +1036,11 @@ SCM_DEFINE (scm_yield, "yield", 0, 0, 0,
}
#undef FUNC_NAME
+/* Some systems, notably Android, lack 'pthread_cancel'. Don't provide
+ 'cancel-thread' on these systems. */
+
+#if !SCM_USE_PTHREAD_THREADS || defined HAVE_PTHREAD_CANCEL
+
SCM_DEFINE (scm_cancel_thread, "cancel-thread", 1, 0, 0,
(SCM thread),
"Asynchronously force the target @var{thread} to terminate. @var{thread} "
@@ -1061,6 +1066,8 @@ SCM_DEFINE (scm_cancel_thread, "cancel-thread", 1, 0, 0,
}
#undef FUNC_NAME
+#endif
+
SCM_DEFINE (scm_set_thread_cleanup_x, "set-thread-cleanup!", 2, 0, 0,
(SCM thread, SCM proc),
"Set the thunk @var{proc} as the cleanup handler for the thread @var{thread}. "