diff options
author | Andy Wingo <wingo@pobox.com> | 2016-10-23 20:28:48 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-10-23 22:29:44 +0200 |
commit | d74e0fed0d79f4ae30aa1acf309f47cfade5c589 (patch) | |
tree | 0187b57092522854ddcdc927c8e1a7e597271af3 /libguile/threads.c | |
parent | 56b490a4dd9b8d775d476154c0d4b96483b49436 (diff) |
Move thread bindings to (ice-9 threads)
* libguile/init.c (scm_i_init_guile): Don't call scm_init_thread_procs.
* libguile/threads.c (scm_init_ice_9_threads): Rename from
scm_init_thread_procs, make static.
(scm_init_threads): Register scm_init_thread_procs extension.
* libguile/threads.h (scm_init_thread_procs): Remove decl.
* module/ice-9/boot-9.scm: Load (ice-9 threads), so that related side
effects occur early.
* module/ice-9/deprecated.scm (define-deprecated): Fix to allow
deprecated bindings to appear in operator position. Export deprecated
bindings.
(define-deprecated/threads, define-deprecated/threads*): Trampoline
thread bindings to (ice-9 threads).
* module/ice-9/futures.scm: Use ice-9 threads.
* module/ice-9/threads.scm: Load scm_init_ice_9_threads extension.
Reorder definitions and imports so that the module circularity
with (ice-9 futures) continues to work.
* module/language/cps/intmap.scm:
* module/language/cps/intset.scm:
* module/language/tree-il/primitives.scm: Use (ice-9 threads).
* module/language/cps/reify-primitives.scm: Reify current-thread
in (ice-9 threads) module.
* module/srfi/srfi-18.scm: Use ice-9 threads with a module prefix, and
adapt all users. Use proper keywords in module definition form.
* test-suite/tests/filesys.test (test-suite):
* test-suite/tests/fluids.test (test-suite):
* test-suite/tests/srfi-18.test: Use ice-9 threads.
* NEWS: Add entry.
* doc/ref/api-scheduling.texi (Threads): Update.
* doc/ref/posix.texi (Processes): Move current-processor-count and
total-processor-count docs to Threads.
Diffstat (limited to 'libguile/threads.c')
-rw-r--r-- | libguile/threads.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libguile/threads.c b/libguile/threads.c index b6099309f..9f11ac7e8 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -2093,6 +2093,12 @@ scm_t_bits scm_tc16_thread; scm_t_bits scm_tc16_mutex; scm_t_bits scm_tc16_condvar; +static void +scm_init_ice_9_threads (void *unused) +{ +#include "libguile/threads.x" +} + void scm_init_threads () { @@ -2111,6 +2117,10 @@ scm_init_threads () threads_initialized_p = 1; dynwind_critical_section_mutex = scm_make_recursive_mutex (); + + scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION, + "scm_init_ice_9_threads", + scm_init_ice_9_threads, NULL); } void @@ -2120,12 +2130,6 @@ scm_init_threads_default_dynamic_state () scm_i_default_dynamic_state = state; } -void -scm_init_thread_procs () -{ -#include "libguile/threads.x" -} - /* IA64-specific things. */ |