Andy Wingo
c3f08aa866
srfi-18: Inline uses of srfi-18-exception-preserver.
...
* module/srfi/srfi-18.scm (srfi-18-exception-preserver): Inline into
call sites.
2016-10-30 22:37:49 +01:00
Andy Wingo
177a058a40
srfi-18: Use srfi-35 conditions.
...
* module/srfi/srfi-18.scm: Use srfi-35 conditions instead of our
home-grown equivalent system.
(thread-exception-handlers): Remove unused table.
(srfi-18-exception-handler): Always capture key consed to args; no
special case for bare key.
* test-suite/tests/srfi-18.test (provided?): Adapt to reason always
being key+args.
2016-10-30 22:30:21 +01:00
Andy Wingo
0d57476f0a
srfi-18: Use parameters.
...
* module/srfi/srfi-18.scm: Use srfi-34 internally with srfi-34: prefix.
(current-exception-handler): Be a parameter.
(with-exception-handler): Adapt to current-exception-handler change.
(thread-join!, mutex-lock!): Adapt to use srfi-34: prefix.
2016-10-30 22:16:37 +01:00
Andy Wingo
7078218a92
srfi-18: Use lambda* optional arguments.
...
* module/srfi/srfi-18.scm (make-mutex, make-condition-variable): Use
optional arguments.
2016-10-30 21:44:35 +01:00
Andy Wingo
bbcc128153
srfi-18: Simplify thread-sleep!, thread-terminate!.
...
* module/srfi/srfi-18.scm (thread-sleep!): Use `when'.
(thread-terminate!): Simplify.
2016-10-30 21:43:51 +01:00
Andy Wingo
4d23c835c4
srfi-18: Use `match' in thread-start!.
...
* module/srfi/srfi-18.scm (thread-start!): Use `match'.
2016-10-30 21:43:08 +01:00
Andy Wingo
501c0e67b1
srfi-18: Improve style.
...
* module/srfi/srfi-18.scm (raise): Rely on SRFI-34 to #:replace raise.
(make-thread): Use lambda* and when.
2016-10-30 20:43:07 +01:00
Andy Wingo
d74e0fed0d
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.
2016-10-23 22:29:44 +02:00
Mark H Weaver
475772ea57
Merge branch 'stable-2.0'
...
Conflicts:
GUILE-VERSION
NEWS
guile-readline/ice-9/readline.scm
libguile/async.c
libguile/backtrace.c
libguile/deprecated.h
libguile/gc-malloc.c
libguile/gdbint.c
libguile/init.c
libguile/ioext.c
libguile/mallocs.c
libguile/print.c
libguile/rw.c
libguile/scmsigs.c
libguile/script.c
libguile/simpos.c
libguile/snarf.h
libguile/strports.c
libguile/threads.c
libguile/vm-i-scheme.c
libguile/vm-i-system.c
module/srfi/srfi-18.scm
test-suite/Makefile.am
test-suite/standalone/test-num2integral.c
2014-04-25 02:06:01 -04:00
Nathaniel Alderson
8d124d2077
Calculate usecs correctly in thread-sleep!
...
* module/srfi/srfi-18.scm (thread-sleep!): Correctly compute
microseconds.
* test-suite/tests/srfi-18.test: Add test.
2014-03-23 21:58:54 +01:00
Mark H Weaver
6587bcfa53
SRFI-18: Export 'current-thread'.
...
Fixes <http://debbugs.gnu.org/16890 >.
Reported by Xin Wang <dram.wang@gmail.com>.
* module/srfi/srfi-18.scm: Reexport 'current-thread'.
* THANKS: Add "Xin Wang" to fixes section.
2014-02-27 22:38:53 -05:00
Andy Wingo
f9c3584117
srfi-18 cleanup
...
* module/srfi/srfi-18.scm (with-exception-handler):
(thread-join!, mutex-lock!, mutex-unlock!): Avoid useless invocations
of `apply'.
2012-02-24 19:42:00 +01:00
Ludovic Courtès
6734191c68
Remove unused top-level variables.
...
* module/ice-9/runq.scm (fork-strips): Remove.
* module/language/assembly.scm (*block-alignment*): Remove.
* module/language/assembly/disassemble.scm (disassemble-objects,
simplify): Remove.
* module/srfi/srfi-18.scm (mutex-owners): Remove.
* module/srfi/srfi-19.scm (leap-year?): Remove.
* module/system/base/compile.scm (dsu-sort): Remove.
* module/texinfo.scm (ascii->char): Remove.
* module/texinfo/html.scm (ignored?): Remove.
* module/texinfo/indexing.scm (def-name): Remove.
* module/texinfo/plain-text.scm (ignore): Remove.
2010-01-11 01:21:14 +01:00
Ludovic Courtès
84012ef4b1
Fix typos leading to unbound variable references.
...
* module/ice-9/session.scm (help): Fix unbound reference to `env'.
* module/system/vm/program.scm (program-property): Fix typo.
* module/system/vm/frame.scm: Add missing `#:use-module (system vm
objcode)'.
* module/system/repl/command.scm (guile:load): New.
(load): Use either `primitive-load' or `load'.
* module/srfi/srfi-18.scm (thread-sleep!): Fix typo.
* module/srfi/srfi-19.scm: Use `(ice-9 rdelim)'.
(date->broken-down-time, priv:year-day, priv:char->int): Fix typo.
(time-*->time-*, time-*->time-*!): Fix reference to unbound variable
`caller'.
* module/oop/goops.scm (bound-check-get): Fix typo.
* module/language/glil/compile-assembly.scm (glil->assembly): Fix typo.
* module/language/glil.scm (parse-glil): Fix typo.
* module/language/ecmascript/base.scm (object->value/string,
object->value/number, ->number): Fix typos.
* module/language/assembly/disassemble.scm (disassemble-free-vars): Fix
typo.
2009-10-22 22:57:25 +02:00
Neil Jerram
83ba2d3750
Complete changing license to LGPLv3+
...
(Still guile-readline to do, but that will all be GPLv3+.)
2009-06-17 22:30:26 +01:00
Andy Wingo
2032f3d1db
fix multiple values returning from srfi-18's `with-exception-handler'
...
* module/srfi/srfi-18.scm (with-exception-handler): Hah! Fixed a
scurrilous bug in which we assumed that the thunk returned one or more
values. Hah.
2009-05-21 21:39:37 +02:00
Andy Wingo
30a5e062d0
procedures in "drop" contexts can return unspecified values
...
* module/language/tree-il/compile-glil.scm (flatten): For applications in
"drop" context, allow the procedure to return unspecified values
(including 0 values).
* test-suite/tests/tree-il.test ("application"): Adapt test.
* module/srfi/srfi-18.scm (wrap): Clarify.
* test-suite/tests/srfi-18.test: Fix so that the expression importing
srfi-18 is expanded before the tests. However the tests are still
failing, something about 0-valued returns...
2009-05-21 17:22:58 +02:00
Andy Wingo
ea93465de7
move scm srfi files to module/srfi, and compile them.
...
* .gitignore: Add gdb-pre-inst-guile.
* configure.in: Add module/srfi/Makefile.
* module/Makefile.am: Add srfi/.
* module/srfi/: SRFI scheme files moved here, and compiled.
* srfi/Makefile.am: Remove the bits about the scheme files.
2008-11-01 13:49:23 +01:00