Daniel Llorens
0ebea8746b
Remove deprecated array functions
...
* libguile/array-map.c (scm_array_fill_int, scm_array_fill_int,
scm_ra_eqp, scm_ra_lessp scm_ra_leqp, scm_ra_grp, scm_ra_greqp,
scm_ra_sum, scm_ra_difference, scm_ra_product, scm_ra_divide,
scm_array_identity): Remove deprecated functions.
* libguile/array-map.h: Remove declaration of deprecated functions.
* libguile/generalized-vectors.h, libguile/generalized-vectors.c
(scm_is_generalized_vector, scm_c_generalized_vector_length,
scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x): These
functions were deprecated in 2.0.9. Remove.
* doc/ref/api-compound.texi: Remove uniform-array-read!,
uniform-array-write from the manual. These procedures where removed in
fc7bd367ab
(2011-05-12).
2016-11-18 12:03:29 +01:00
Christopher Allan Webber
6bdd955115
doc: Adjust capitalization for "HTTPS" and "GnuTLS".
...
* doc/ref/web.texi (open-socket-for-uri): Adjust capitalization.
2016-11-07 12:13:17 -06:00
Christopher Allan Webber
8f1db9f268
web: Add https support through gnutls.
...
Since importing gnutls directly would result in a dependency cycle,
we load gnutls lazily.
This uses code originally written for Guix by Ludovic Courtès.
* module/web/client.scm: (%http-receive-buffer-size)
(gnutls-module, ensure-gnutls, gnutls-ref, tls-wrap): New variables.
(open-socket-for-uri): Wrap in tls when uri scheme is https.
* doc/ref/web.texi (open-socket-for-uri): Document gnutls usage.
2016-11-07 12:05:30 -06:00
Andy Wingo
2c0c6414bb
Minor editing in api-scheduling.texi
...
* doc/ref/api-scheduling.texi: Fix a couple editing mistakes.
2016-11-06 18:29:05 +01:00
Andy Wingo
16fe02aa15
Update documentation on mutexes
...
* doc/ref/api-scheduling.texi (Mutexes and Condition Variables):
Update.
2016-11-06 18:11:25 +01:00
Andy Wingo
8d907758a0
Update mutex documentation
...
* doc/ref/api-scheduling.texi (Mutexes and Condition Variables): Add
foreboding preface.
2016-11-05 19:38:40 +01:00
Andy Wingo
3ce76c38cb
SRFI-18 threads disjoint from guile threads
...
* doc/ref/srfi-modules.texi (SRFI-18 Threads): Update.
* module/srfi/srfi-18.scm (<mutex>): Add owner field.
(<thread>): New data type.
(make-thread): Adapt for boxed threads.
(thread-start!, thread-terminate!): Likewise.
(mutex-state): Adapt for boxed threads.
(mutex-lock!, mutex-unlock!): Update owner field.
2016-11-04 22:35:19 +01:00
Andy Wingo
bb4e955f0c
Update SRFI-18 documentation.
...
* doc/ref/srfi-modules.texi (SRFI-18): Update documentation for disjoint
mutexes and cond variables.
2016-11-04 20:41:52 +01:00
Andy Wingo
10471f40fe
Fix typo in threads documentation
...
* doc/ref/api-scheduling.texi (Threads): Fix typo.
2016-11-02 19:10:33 +01:00
Andy Wingo
fcc6a7ba20
Deprecate critical sections
...
* NEWS: Deprecate critical sections.
* doc/ref/api-scheduling.texi (Critical Sections): Remove.
* libguile/async.c:
* libguile/async.h:
* libguile/deprecated.c:
* libguile/deprecated.h:
* libguile/threads.c:
* libguile/threads.h: Deprecate critical section API.
2016-11-01 23:48:42 +01:00
Andy Wingo
b2e7662ebe
Add scm_yield to manual alongside yield
...
* doc/ref/api-scheduling.texi (Threads): Mention scm_yield.
2016-11-01 19:58:06 +01:00
Andy Wingo
4280c818c2
api-scheduling.texi: Syntactic cleanups.
...
* doc/ref/api-scheduling.texi: Remove vestigial comments.
2016-11-01 19:40:19 +01:00
Andy Wingo
eeeee3297b
Remove thread cleanup facility
...
* NEWS: Add entry.
* doc/ref/api-scheduling.texi (Threads): Remove thread-cleanup docs.
* libguile/threads.c (guilify_self_1, do_thread_exit):
(scm_set_thread_cleanup_x, scm_thread_cleanup): Remove these.
* libguile/threads.h (scm_i_thread): Remove cleanup_handler.
* module/ice-9/threads.scm:
* module/ice-9/deprecated.scm (thread-cleanup, set-thread-cleanup!):
Remove.
* test-suite/tests/threads.test: Adapt to test cancel-thread return
values and not test thread-cleanup procs.
2016-10-31 22:37:46 +01:00
Andy Wingo
a7114ced5f
cancel-thread can take arguments
...
* doc/ref/api-scheduling.texi (Threads):
* module/ice-9/threads.scm (cancel-thread): Additional args to
cancel-thread will be returned by the thread.
2016-10-31 22:11:01 +01:00
Andy Wingo
a04739b31a
cancel-thread via asyncs, not pthread_cancel
...
* module/ice-9/threads.scm (cancel-tag): New variable.
(cancel-thread): New Scheme function.
(call-with-new-thread): Install a prompt around the thread.
* libguile/threads.h (scm_i_thread): Remove cancelled member.
* libguile/threads.c (scm_cancel_thread): Call out to Scheme. Always
available, and works on the current thread too.
(scm_set_thread_cleanup_x, scm_thread_cleanup): Adapt.
(scm_init_ice_9_threads): Capture cancel-thread var.
* doc/ref/api-scheduling.texi (Threads): Update.
* NEWS: Update.
2016-10-27 21:22:28 +02: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
Andy Wingo
efcc30fc34
Small api-scheduling.texi reorder
...
* doc/ref/api-scheduling.texi: Put "Threads" section at beginning of
scheduling chapter.
2016-10-18 21:25:42 +02:00
Andy Wingo
51d322b2d4
Update "Asyncs" section of manual.
...
* doc/ref/api-scheduling.texi (Asyncs): Update.
2016-10-18 21:24:01 +02:00
Andy Wingo
59f09d185b
Deprecate user asyncs
...
* libguile/async.c:
* libguile/async.h:
* libguile/deprecated.c:
* libguile/deprecated.h (scm_async, scm_async_mark, scm_run_asyncs):
Deprecate these functions, which comprise the "users asyncs" facility.
* module/oop/goops.scm: Adapt to <async> deprecation.
* doc/ref/api-scheduling.texi:
* doc/ref/libguile-concepts.texi:
* doc/ref/libguile-foreign-objects.texi:
* doc/ref/posix.texi: Remove documentation on user asyncs, and replace
references to "system asyncs" to be just "asyncs".
2016-10-17 21:58:08 +02:00
Andy Wingo
56d8d9a257
Deprecate arbiters
...
* libguile/arbiters.c:
* libguile/arbiters.h:
* test-suite/tests/arbiters.test: Delete files.
* libguile/deprecated.c:
* libguile/deprecated.h: Move arbiters code here.
* doc/ref/api-scheduling.texi: Remove section on arbiters.
* libguile.h:
* libguile/Makefile.am:
* libguile/init.c:
* module/oop/goops.scm:
* test-suite/Makefile.am: Remove mention of arbiters.
* NEWS: Update.
2016-10-17 21:29:05 +02:00
Andy Wingo
32f309d5ce
Compiler support for atomics
...
* doc/ref/vm.texi (Inlined Atomic Instructions): New section.
* libguile/vm-engine.c (VM_VALIDATE_ATOMIC_BOX, make-atomic-box)
(atomic-box-ref, atomic-box-set!, atomic-box-swap!)
(atomic-box-compare-and-swap!): New instructions.
* libguile/vm.c: Include atomic and atomics-internal.h.
(vm_error_not_a_atomic_box): New function.
* module/ice-9/atomic.scm: Register primitives with the compiler.
* module/language/cps/compile-bytecode.scm (compile-function): Add
support for atomic ops.
* module/language/cps/effects-analysis.scm: Add comment about why no
effects analysis needed.
* module/language/cps/reify-primitives.scm (primitive-module): Add case
for (ice-9 atomic).
* module/language/tree-il/primitives.scm (*effect-free-primitives*):
(*effect+exception-free-primitives*): Add atomic-box?.
* module/system/vm/assembler.scm: Add new instructions.
* test-suite/tests/atomic.test: Test with compilation and
interpretation.
2016-09-06 12:18:35 +02:00
Andy Wingo
3425290a7b
Add atomic boxes
...
* doc/ref/api-scheduling.texi (Atomics): New manual section.
* libguile.h: Include atomic.h.
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Add atomic.
* libguile/atomic.c:
* libguile/atomic.h: New files.
* libguile/atomics-internal.h (scm_atomic_set_scm, scm_atomic_ref_scm)
(scm_atomic_swap_scm, scm_atomic_compare_and_swap_scm): New
facilities.
* libguile/goops.c (class_atomic_box, scm_sys_goops_early_init): Add
support for <atomic-box>. Remove duplicate <keyword> fetch.
* libguile/init.c (scm_i_init_guile): Call scm_register_atomic_box.
* libguile/print.c (iprin1): Add atomic box case.
* libguile/tags.h (scm_tc7_atomic_box): New tag.
* libguile/validate.h (SCM_VALIDATE_ATOMIC_BOX): New macro.
* module/Makefile.am (SOURCES): Add ice-9/atomic.scm.
* module/ice-9/atomic.scm: New file.
* module/oop/goops.scm (<atomic-box>): New var.
2016-09-06 11:16:53 +02:00
Wilfred Hughes
605a01bfce
Clarify bootstrap docs
...
* doc/ref/vm.texi: Add a sentence stating which parts of the bytecode
toolchain are in C, and which are in Scheme. This avoids confusion if
users assume Guile==Scheme and so assume the whole toolchain is in
Scheme.
2016-09-05 20:50:31 +02:00
Andy Wingo
b494bc1743
Fix typo in Nil documentation
...
* doc/ref/api-languages.texi (Nil): Fix typo. Thanks to Wilfred Hughes
for the report. Fixes #24342 .
2016-09-02 10:12:28 +02:00
Andy Wingo
49d77b1243
Add unboxed logxor on u64 values
...
* libguile/vm-engine.c (ulogxor): New instruction.
* module/language/cps/effects-analysis.scm (ulogxor):
* module/language/cps/slot-allocation.scm (compute-var-representations):
* module/language/cps/types.scm (ulogxor):
* module/system/vm/assembler.scm (emit-ulogxor): Add support for new
instruction.
* doc/ref/vm.texi (Unboxed Integer Arithmetic): Document ulogxor.
2016-09-01 10:53:59 +02:00
Andy Wingo
b8a53b98b3
Only ptob->close() after read/write finish
...
* libguile/Makefile.am (noinst_HEADERS): Add atomics-internal.h.
* libguile/atomics-internal.h: New file.
* libguile/ports-internal.h (refcount): New member.
* libguile/ports.c (release_port, scm_dynwind_acquire_port): New
facility for acquiring a port within a dynwind.
(scm_port_poll, scm_i_read_bytes, scm_setvbuf, scm_end_input)
(scm_i_write_bytes, scm_char_ready_p, scm_seek)
(scm_truncate_file, trampoline_to_c_read)
(trampoline_to_c_write): Acquire port.
(scm_c_make_port_with_encoding): Init refcount to 1.
(scm_close_port): Release port.
* doc/ref/api-io.texi (I/O Extensions): Add documentation
2016-08-31 19:10:35 +02:00
Christopher Allan Webber
cc9e72bd2b
Fix example in make-custom-binary-input-port documentation
...
* doc/ref/api-io.texi (Custom Ports): Add additional argument to example's
invocation of make-custom-binary-input-port. Previously had mismatched arity
by missing "closed" argument.
2016-08-31 15:51:38 +02:00
Andy Wingo
2fa2e50a0f
Add file descriptor finalizers
...
* doc/ref/posix.texi (Ports and File Descriptors): Document new
interfaces.
* libguile/filesys.c (scm_close, scm_close_fdes)
* libguile/fports.c (fport_close):
* libguile/ioext.c (scm_primitive_move_to_fdes): Call
scm_run_fdes_finalizers.
* module/ice-9/fdes-finalizers.scm:
* test-suite/tests/fdes-finalizers.test:
* libguile/fdes-finalizers.h:
* libguile/fdes-finalizers.c: New files.
* module/Makefile.am:
* test-suite/Makefile.am:
* libguile/Makefile.am:
* libguile.h:
* libguile/init.c: Wire up new files.
2016-08-30 23:35:10 +02:00
Andy Wingo
4256e0655f
Remove duplicate documentation
...
* doc/ref/posix.texi (Ports and File Descriptors): Remove duplicate
documentation for port-mode and setvbuf.
2016-08-28 22:13:59 +02:00
sirgazil
8f2f8db10b
Fix typo about open-pipe
...
* doc/ref/posix.texi (Pipes): Fix typo.
2016-08-08 22:21:59 +02:00
sirgazil
24502780eb
Fix typo about variable definitions
...
* doc/ref/api-binding.texi (Top Level Variable Definitions): Fix typo.
2016-08-08 00:06:32 +02:00
Ethan Stefan Day
96d3cb3fcf
Documentation fixes
...
* doc/ref/api-compound.texi:
* doc/ref/api-control.texi:
* doc/ref/api-data.texi: Fix typos and clarify.
2016-08-07 23:40:16 +02:00
Calvin Heim
978229a52a
Fix grammar in api-compound.texi
...
* doc/ref/api-compound.texi: Fix grammar.
2016-08-07 12:58:34 +02:00
sirgazil
0f1b5674c4
Fix typo about pattern variables
...
* doc/ref/sxml-match.texi (Matching XML Elements): Fix typo.
2016-08-07 11:57:35 +02:00
Andy Wingo
e68dd5c601
Manual recommends against SRFI-10
...
* doc/ref/srfi-modules.texi (SRFI-10): Deprecate, or at least recommend
against.
2016-08-07 11:55:01 +02:00
Andy Wingo
1a1c3bbe59
Implement R6RS custom binary input/output ports
...
* NEWS: Add new feature.
* doc/ref/r6rs.texi (rnrs io ports):
* doc/ref/api-io.texi (Custom Ports): Document new procedure.
* libguile/r6rs-ports.h:
* libguile/r6rs-ports.c (make_custom_binary_input_output_port)
(scm_make_custom_binary_input_output_port)
(custom_binary_input_output_port_random_access_p)
(initialize_custom_binary_input_output_ports)
(scm_init_r6rs_ports): Implement custom binary input/output ports.
* module/rnrs/io/ports.scm (rnrs):
* module/ice-9/binary-ports.scm (ice-9): Export
make-custom-binary-input/output-port.
2016-08-04 22:29:51 +02:00
Ludovic Courtès
ad7e806a9f
doc: Add unquote and unquote-splicing examples.
...
Suggested by Vincent Legoll <vincent.legoll@gmail.com>.
* doc/ref/api-evaluation.texi (Expression Syntax): Add an unquote and an
unquote-splicing example.
2016-07-25 11:49:40 +02:00
Andy Wingo
aae3561584
Allow mkstemp! to have optional "mode" argument
...
* m4/mkstemp.m4: Remove.
* lib/mkstemp.c: Remove.
* lib/mkostemp.c: New file.
* m4/mkostemp.m4: New file.
* lib/Makefile.am:
* m4/gnulib-cache.m4:
* m4/gnulib-comp.m4: Remove mkstemp module, replace with mkostemp.
* libguile/fports.h:
* libguile/fports.c (scm_i_mode_to_open_flags): Factor out helper to
parse mode string to open flags.
(scm_open_file_with_encoding): Use the new helper.
* libguile/filesys.c:
(scm_i_mkstemp): Adapt to take optional second argument, being a mode
string. Use mkostemp.
(scm_mkstemp): Backwards compatible shim that calls scm_i_mkstemp.
* doc/ref/posix.texi:
* NEWS: Update.
* module/system/base/compile.scm (call-with-output-file/atomic): Pass
"wb" as mode, to cause O_BINARY to be added on MinGW.
2016-07-25 11:46:18 +02:00
Ricardo Wurmus
e868fae658
doc: Do not gender the programmer.
...
* doc/ref/api-foreign.texi: Replace "his" with "their".
* doc/ref/sxml.texi: Likewise.
2016-07-25 11:44:52 +02:00
Andy Wingo
513344e33d
Add popen feature
...
* doc/ref/api-options.texi (Common Feature Symbols): Document the popen
feature.
* doc/ref/posix.texi (Pipes): Depend on the popen feature, not fork.
* libguile/posix.c (scm_init_posix): Add popen feature if we can.
2016-07-25 11:43:54 +02:00
Andy Wingo
38f23e75a5
Add meta/build-env
...
* meta/build-env.in: New file which sets up an environment that does not
inherit GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH (unless
cross-compiling).
* doc/ref/Makefile.am (autoconf-macros.texi):
* libguile/Makefile.am (snarf2checkedtexi):
* module/Makefile.am (ice-9/psyntax-pp.go):
* test-suite/standalone/Makefile.am (GUILE_INSTALL_LOCALE):
* am/bootstrap.am (.scm.go):
* am/guilec (.scm.go): Use build-env.
* configure.ac: Create build-env.
2016-07-10 14:10:26 +02:00
Andy Wingo
d484bfbace
Update Gnulib to 68b6ade.
...
Also add --conditional-dependencies to the flags. See:
https://lists.gnu.org/archive/html/guile-devel/2016-07/msg00012.html
2016-07-07 14:05:53 +02:00
Andy Wingo
73714b87aa
Add documentation pointer from getopt-long to SRFI-37.
...
* doc/ref/mod-getopt-long.texi (getopt-long): Point to SRFI-37.
2016-06-25 10:06:15 +02:00
Andy Wingo
5f9134c32d
Favor "escape continuation" over "one-shot continuation" in manual
...
* doc/ref/api-control.texi (Prompt Primitives): Remove mention of
one-shot continuations, as it's possible to invoke them multiple times
if the continuation is re-entered through other means.
2016-06-24 18:18:46 +02:00
Andy Wingo
cab7167849
Fix typo about `keywords' read option
...
* doc/ref/api-data.texi (Keyword Read Syntax): Fix typo. Thanks to
Glenn Michaels for the report and fix.
2016-06-24 09:55:28 +02:00
Andy Wingo
20718dd94b
Add with-input-from-port, etc documentation
...
* doc/ref/api-io.texi (Default Ports): Add documentation for
with-input-from-port, with-output-to-port, and with-error-to-port.
Fixes #20919 .
2016-06-24 09:05:05 +02:00
Andy Wingo
f84006c564
Clarify use of the term "scanning" in the manual
...
* doc/ref/api-memory.texi (Garbage Collection Functions):
* doc/ref/libguile-concepts.texi (Garbage Collection): Attempt to be
clear that scanning is a thing that happens in the mark phase. Fixes
#20907 I think.
2016-06-24 08:56:21 +02:00
Andy Wingo
8a072fc2d6
Add weak hash table documentation
...
* doc/ref/api-memory.texi (Weak hash tables): Update documentation.
Fixes #20551 .
2016-06-23 22:37:23 +02:00
Andy Wingo
498cd58cb4
Fix R6RS fold-left documentation
...
* doc/ref/r6rs.texi (rnrs lists): Fix documentation of fold-left.
2016-06-23 21:39:23 +02:00
Daniel Llorens
e7f1038aca
Remove unused doc/maint
2016-06-23 13:21:32 +02:00