mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 18:20:22 +02:00
Synchronized docstrings.
This commit is contained in:
parent
db6673e5a3
commit
673ba2da04
6 changed files with 1900 additions and 1745 deletions
2943
doc/maint/guile.texi
2943
doc/maint/guile.texi
File diff suppressed because it is too large
Load diff
|
@ -808,6 +808,11 @@ Store @var{fill} in every position of @var{vector}. The value
|
|||
returned by @code{vector-fill!} is unspecified.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} vector-copy vec
|
||||
@deffnx {C Function} scm_vector_copy (vec)
|
||||
Return a copy of @var{vec}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} vector-move-left! vec1 start1 end1 vec2 start2
|
||||
@deffnx {C Function} scm_vector_move_left_x (vec1, start1, end1, vec2, start2)
|
||||
Copy elements from @var{vec1}, positions @var{start1} to @var{end1},
|
||||
|
@ -1048,19 +1053,19 @@ anyway to make the intention clear, so this is rarely a problem.
|
|||
@deffnx {Scheme Procedure} f64vector? obj
|
||||
@deffnx {Scheme Procedure} c32vector? obj
|
||||
@deffnx {Scheme Procedure} c64vector? obj
|
||||
@deffnx {C Function} scm_uniform_vector_p obj
|
||||
@deffnx {C Function} scm_u8vector_p obj
|
||||
@deffnx {C Function} scm_s8vector_p obj
|
||||
@deffnx {C Function} scm_u16vector_p obj
|
||||
@deffnx {C Function} scm_s16vector_p obj
|
||||
@deffnx {C Function} scm_u32vector_p obj
|
||||
@deffnx {C Function} scm_s32vector_p obj
|
||||
@deffnx {C Function} scm_u64vector_p obj
|
||||
@deffnx {C Function} scm_s64vector_p obj
|
||||
@deffnx {C Function} scm_f32vector_p obj
|
||||
@deffnx {C Function} scm_f64vector_p obj
|
||||
@deffnx {C Function} scm_c32vector_p obj
|
||||
@deffnx {C Function} scm_c64vector_p obj
|
||||
@deffnx {C Function} scm_uniform_vector_p (obj)
|
||||
@deffnx {C Function} scm_u8vector_p (obj)
|
||||
@deffnx {C Function} scm_s8vector_p (obj)
|
||||
@deffnx {C Function} scm_u16vector_p (obj)
|
||||
@deffnx {C Function} scm_s16vector_p (obj)
|
||||
@deffnx {C Function} scm_u32vector_p (obj)
|
||||
@deffnx {C Function} scm_s32vector_p (obj)
|
||||
@deffnx {C Function} scm_u64vector_p (obj)
|
||||
@deffnx {C Function} scm_s64vector_p (obj)
|
||||
@deffnx {C Function} scm_f32vector_p (obj)
|
||||
@deffnx {C Function} scm_f64vector_p (obj)
|
||||
@deffnx {C Function} scm_c32vector_p (obj)
|
||||
@deffnx {C Function} scm_c64vector_p (obj)
|
||||
Return @code{#t} if @var{obj} is a homogeneous numeric vector of the
|
||||
indicated type.
|
||||
@end deffn
|
||||
|
@ -1107,18 +1112,18 @@ unspecified.
|
|||
@deffnx {Scheme Procedure} f64vector value @dots{}
|
||||
@deffnx {Scheme Procedure} c32vector value @dots{}
|
||||
@deffnx {Scheme Procedure} c64vector value @dots{}
|
||||
@deffnx {C Function} scm_u8vector values
|
||||
@deffnx {C Function} scm_s8vector values
|
||||
@deffnx {C Function} scm_u16vector values
|
||||
@deffnx {C Function} scm_s16vector values
|
||||
@deffnx {C Function} scm_u32vector values
|
||||
@deffnx {C Function} scm_s32vector values
|
||||
@deffnx {C Function} scm_u64vector values
|
||||
@deffnx {C Function} scm_s64vector values
|
||||
@deffnx {C Function} scm_f32vector values
|
||||
@deffnx {C Function} scm_f64vector values
|
||||
@deffnx {C Function} scm_c32vector values
|
||||
@deffnx {C Function} scm_c64vector values
|
||||
@deffnx {C Function} scm_u8vector (values)
|
||||
@deffnx {C Function} scm_s8vector (values)
|
||||
@deffnx {C Function} scm_u16vector (values)
|
||||
@deffnx {C Function} scm_s16vector (values)
|
||||
@deffnx {C Function} scm_u32vector (values)
|
||||
@deffnx {C Function} scm_s32vector (values)
|
||||
@deffnx {C Function} scm_u64vector (values)
|
||||
@deffnx {C Function} scm_s64vector (values)
|
||||
@deffnx {C Function} scm_f32vector (values)
|
||||
@deffnx {C Function} scm_f64vector (values)
|
||||
@deffnx {C Function} scm_c32vector (values)
|
||||
@deffnx {C Function} scm_c64vector (values)
|
||||
Return a newly allocated homogeneous numeric vector of the indicated
|
||||
type, holding the given parameter @var{value}s. The vector length is
|
||||
the number of parameters given.
|
||||
|
@ -1137,19 +1142,19 @@ the number of parameters given.
|
|||
@deffnx {Scheme Procedure} f64vector-length vec
|
||||
@deffnx {Scheme Procedure} c32vector-length vec
|
||||
@deffnx {Scheme Procedure} c64vector-length vec
|
||||
@deffnx {C Function} scm_uniform_vector_length vec
|
||||
@deffnx {C Function} scm_u8vector_length vec
|
||||
@deffnx {C Function} scm_s8vector_length vec
|
||||
@deffnx {C Function} scm_u16vector_length vec
|
||||
@deffnx {C Function} scm_s16vector_length vec
|
||||
@deffnx {C Function} scm_u32vector_length vec
|
||||
@deffnx {C Function} scm_s32vector_length vec
|
||||
@deffnx {C Function} scm_u64vector_length vec
|
||||
@deffnx {C Function} scm_s64vector_length vec
|
||||
@deffnx {C Function} scm_f32vector_length vec
|
||||
@deffnx {C Function} scm_f64vector_length vec
|
||||
@deffnx {C Function} scm_c32vector_length vec
|
||||
@deffnx {C Function} scm_c64vector_length vec
|
||||
@deffnx {C Function} scm_uniform_vector_length (vec)
|
||||
@deffnx {C Function} scm_u8vector_length (vec)
|
||||
@deffnx {C Function} scm_s8vector_length (vec)
|
||||
@deffnx {C Function} scm_u16vector_length (vec)
|
||||
@deffnx {C Function} scm_s16vector_length (vec)
|
||||
@deffnx {C Function} scm_u32vector_length (vec)
|
||||
@deffnx {C Function} scm_s32vector_length (vec)
|
||||
@deffnx {C Function} scm_u64vector_length (vec)
|
||||
@deffnx {C Function} scm_s64vector_length (vec)
|
||||
@deffnx {C Function} scm_f32vector_length (vec)
|
||||
@deffnx {C Function} scm_f64vector_length (vec)
|
||||
@deffnx {C Function} scm_c32vector_length (vec)
|
||||
@deffnx {C Function} scm_c64vector_length (vec)
|
||||
Return the number of elements in @var{vec}.
|
||||
@end deffn
|
||||
|
||||
|
@ -1166,19 +1171,19 @@ Return the number of elements in @var{vec}.
|
|||
@deffnx {Scheme Procedure} f64vector-ref vec i
|
||||
@deffnx {Scheme Procedure} c32vector-ref vec i
|
||||
@deffnx {Scheme Procedure} c64vector-ref vec i
|
||||
@deffnx {C Function} scm_uniform_vector_ref vec i
|
||||
@deffnx {C Function} scm_u8vector_ref vec i
|
||||
@deffnx {C Function} scm_s8vector_ref vec i
|
||||
@deffnx {C Function} scm_u16vector_ref vec i
|
||||
@deffnx {C Function} scm_s16vector_ref vec i
|
||||
@deffnx {C Function} scm_u32vector_ref vec i
|
||||
@deffnx {C Function} scm_s32vector_ref vec i
|
||||
@deffnx {C Function} scm_u64vector_ref vec i
|
||||
@deffnx {C Function} scm_s64vector_ref vec i
|
||||
@deffnx {C Function} scm_f32vector_ref vec i
|
||||
@deffnx {C Function} scm_f64vector_ref vec i
|
||||
@deffnx {C Function} scm_c32vector_ref vec i
|
||||
@deffnx {C Function} scm_c64vector_ref vec i
|
||||
@deffnx {C Function} scm_uniform_vector_ref (vec i)
|
||||
@deffnx {C Function} scm_u8vector_ref (vec i)
|
||||
@deffnx {C Function} scm_s8vector_ref (vec i)
|
||||
@deffnx {C Function} scm_u16vector_ref (vec i)
|
||||
@deffnx {C Function} scm_s16vector_ref (vec i)
|
||||
@deffnx {C Function} scm_u32vector_ref (vec i)
|
||||
@deffnx {C Function} scm_s32vector_ref (vec i)
|
||||
@deffnx {C Function} scm_u64vector_ref (vec i)
|
||||
@deffnx {C Function} scm_s64vector_ref (vec i)
|
||||
@deffnx {C Function} scm_f32vector_ref (vec i)
|
||||
@deffnx {C Function} scm_f64vector_ref (vec i)
|
||||
@deffnx {C Function} scm_c32vector_ref (vec i)
|
||||
@deffnx {C Function} scm_c64vector_ref (vec i)
|
||||
Return the element at index @var{i} in @var{vec}. The first element
|
||||
in @var{vec} is index 0.
|
||||
@end deffn
|
||||
|
@ -1196,19 +1201,19 @@ in @var{vec} is index 0.
|
|||
@deffnx {Scheme Procedure} f64vector-set! vec i value
|
||||
@deffnx {Scheme Procedure} c32vector-set! vec i value
|
||||
@deffnx {Scheme Procedure} c64vector-set! vec i value
|
||||
@deffnx {C Function} scm_uniform_vector_set_x vec i value
|
||||
@deffnx {C Function} scm_u8vector_set_x vec i value
|
||||
@deffnx {C Function} scm_s8vector_set_x vec i value
|
||||
@deffnx {C Function} scm_u16vector_set_x vec i value
|
||||
@deffnx {C Function} scm_s16vector_set_x vec i value
|
||||
@deffnx {C Function} scm_u32vector_set_x vec i value
|
||||
@deffnx {C Function} scm_s32vector_set_x vec i value
|
||||
@deffnx {C Function} scm_u64vector_set_x vec i value
|
||||
@deffnx {C Function} scm_s64vector_set_x vec i value
|
||||
@deffnx {C Function} scm_f32vector_set_x vec i value
|
||||
@deffnx {C Function} scm_f64vector_set_x vec i value
|
||||
@deffnx {C Function} scm_c32vector_set_x vec i value
|
||||
@deffnx {C Function} scm_c64vector_set_x vec i value
|
||||
@deffnx {C Function} scm_uniform_vector_set_x (vec i value)
|
||||
@deffnx {C Function} scm_u8vector_set_x (vec i value)
|
||||
@deffnx {C Function} scm_s8vector_set_x (vec i value)
|
||||
@deffnx {C Function} scm_u16vector_set_x (vec i value)
|
||||
@deffnx {C Function} scm_s16vector_set_x (vec i value)
|
||||
@deffnx {C Function} scm_u32vector_set_x (vec i value)
|
||||
@deffnx {C Function} scm_s32vector_set_x (vec i value)
|
||||
@deffnx {C Function} scm_u64vector_set_x (vec i value)
|
||||
@deffnx {C Function} scm_s64vector_set_x (vec i value)
|
||||
@deffnx {C Function} scm_f32vector_set_x (vec i value)
|
||||
@deffnx {C Function} scm_f64vector_set_x (vec i value)
|
||||
@deffnx {C Function} scm_c32vector_set_x (vec i value)
|
||||
@deffnx {C Function} scm_c64vector_set_x (vec i value)
|
||||
Set the element at index @var{i} in @var{vec} to @var{value}. The
|
||||
first element in @var{vec} is index 0. The return value is
|
||||
unspecified.
|
||||
|
@ -1227,19 +1232,19 @@ unspecified.
|
|||
@deffnx {Scheme Procedure} f64vector->list vec
|
||||
@deffnx {Scheme Procedure} c32vector->list vec
|
||||
@deffnx {Scheme Procedure} c64vector->list vec
|
||||
@deffnx {C Function} scm_uniform_vector_to_list vec
|
||||
@deffnx {C Function} scm_u8vector_to_list vec
|
||||
@deffnx {C Function} scm_s8vector_to_list vec
|
||||
@deffnx {C Function} scm_u16vector_to_list vec
|
||||
@deffnx {C Function} scm_s16vector_to_list vec
|
||||
@deffnx {C Function} scm_u32vector_to_list vec
|
||||
@deffnx {C Function} scm_s32vector_to_list vec
|
||||
@deffnx {C Function} scm_u64vector_to_list vec
|
||||
@deffnx {C Function} scm_s64vector_to_list vec
|
||||
@deffnx {C Function} scm_f32vector_to_list vec
|
||||
@deffnx {C Function} scm_f64vector_to_list vec
|
||||
@deffnx {C Function} scm_c32vector_to_list vec
|
||||
@deffnx {C Function} scm_c64vector_to_list vec
|
||||
@deffnx {C Function} scm_uniform_vector_to_list (vec)
|
||||
@deffnx {C Function} scm_u8vector_to_list (vec)
|
||||
@deffnx {C Function} scm_s8vector_to_list (vec)
|
||||
@deffnx {C Function} scm_u16vector_to_list (vec)
|
||||
@deffnx {C Function} scm_s16vector_to_list (vec)
|
||||
@deffnx {C Function} scm_u32vector_to_list (vec)
|
||||
@deffnx {C Function} scm_s32vector_to_list (vec)
|
||||
@deffnx {C Function} scm_u64vector_to_list (vec)
|
||||
@deffnx {C Function} scm_s64vector_to_list (vec)
|
||||
@deffnx {C Function} scm_f32vector_to_list (vec)
|
||||
@deffnx {C Function} scm_f64vector_to_list (vec)
|
||||
@deffnx {C Function} scm_c32vector_to_list (vec)
|
||||
@deffnx {C Function} scm_c64vector_to_list (vec)
|
||||
Return a newly allocated list holding all elements of @var{vec}.
|
||||
@end deffn
|
||||
|
||||
|
@ -1255,18 +1260,18 @@ Return a newly allocated list holding all elements of @var{vec}.
|
|||
@deffnx {Scheme Procedure} list->f64vector lst
|
||||
@deffnx {Scheme Procedure} list->c32vector lst
|
||||
@deffnx {Scheme Procedure} list->c64vector lst
|
||||
@deffnx {C Function} scm_list_to_u8vector lst
|
||||
@deffnx {C Function} scm_list_to_s8vector lst
|
||||
@deffnx {C Function} scm_list_to_u16vector lst
|
||||
@deffnx {C Function} scm_list_to_s16vector lst
|
||||
@deffnx {C Function} scm_list_to_u32vector lst
|
||||
@deffnx {C Function} scm_list_to_s32vector lst
|
||||
@deffnx {C Function} scm_list_to_u64vector lst
|
||||
@deffnx {C Function} scm_list_to_s64vector lst
|
||||
@deffnx {C Function} scm_list_to_f32vector lst
|
||||
@deffnx {C Function} scm_list_to_f64vector lst
|
||||
@deffnx {C Function} scm_list_to_c32vector lst
|
||||
@deffnx {C Function} scm_list_to_c64vector lst
|
||||
@deffnx {C Function} scm_list_to_u8vector (lst)
|
||||
@deffnx {C Function} scm_list_to_s8vector (lst)
|
||||
@deffnx {C Function} scm_list_to_u16vector (lst)
|
||||
@deffnx {C Function} scm_list_to_s16vector (lst)
|
||||
@deffnx {C Function} scm_list_to_u32vector (lst)
|
||||
@deffnx {C Function} scm_list_to_s32vector (lst)
|
||||
@deffnx {C Function} scm_list_to_u64vector (lst)
|
||||
@deffnx {C Function} scm_list_to_s64vector (lst)
|
||||
@deffnx {C Function} scm_list_to_f32vector (lst)
|
||||
@deffnx {C Function} scm_list_to_f64vector (lst)
|
||||
@deffnx {C Function} scm_list_to_c32vector (lst)
|
||||
@deffnx {C Function} scm_list_to_c64vector (lst)
|
||||
Return a newly allocated homogeneous numeric vector of the indicated type,
|
||||
initialized with the elements of the list @var{lst}.
|
||||
@end deffn
|
||||
|
@ -1283,18 +1288,18 @@ initialized with the elements of the list @var{lst}.
|
|||
@deffnx {Scheme Procedure} any->f64vector obj
|
||||
@deffnx {Scheme Procedure} any->c32vector obj
|
||||
@deffnx {Scheme Procedure} any->c64vector obj
|
||||
@deffnx {C Function} scm_any_to_u8vector obj
|
||||
@deffnx {C Function} scm_any_to_s8vector obj
|
||||
@deffnx {C Function} scm_any_to_u16vector obj
|
||||
@deffnx {C Function} scm_any_to_s16vector obj
|
||||
@deffnx {C Function} scm_any_to_u32vector obj
|
||||
@deffnx {C Function} scm_any_to_s32vector obj
|
||||
@deffnx {C Function} scm_any_to_u64vector obj
|
||||
@deffnx {C Function} scm_any_to_s64vector obj
|
||||
@deffnx {C Function} scm_any_to_f32vector obj
|
||||
@deffnx {C Function} scm_any_to_f64vector obj
|
||||
@deffnx {C Function} scm_any_to_c32vector obj
|
||||
@deffnx {C Function} scm_any_to_c64vector obj
|
||||
@deffnx {C Function} scm_any_to_u8vector (obj)
|
||||
@deffnx {C Function} scm_any_to_s8vector (obj)
|
||||
@deffnx {C Function} scm_any_to_u16vector (obj)
|
||||
@deffnx {C Function} scm_any_to_s16vector (obj)
|
||||
@deffnx {C Function} scm_any_to_u32vector (obj)
|
||||
@deffnx {C Function} scm_any_to_s32vector (obj)
|
||||
@deffnx {C Function} scm_any_to_u64vector (obj)
|
||||
@deffnx {C Function} scm_any_to_s64vector (obj)
|
||||
@deffnx {C Function} scm_any_to_f32vector (obj)
|
||||
@deffnx {C Function} scm_any_to_f64vector (obj)
|
||||
@deffnx {C Function} scm_any_to_c32vector (obj)
|
||||
@deffnx {C Function} scm_any_to_c64vector (obj)
|
||||
Return a (maybe newly allocated) uniform numeric vector of the indicated
|
||||
type, initialized with the elements of @var{obj}, which must be a list,
|
||||
a vector, or a uniform vector. When @var{obj} is already a suitable
|
||||
|
@ -1368,6 +1373,57 @@ Like @code{scm_vector_writable_elements} (which see), but returns a
|
|||
pointer to the elements of a uniform numeric vector of the indicated kind.
|
||||
@end deftypefn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector-read! uvec [port_or_fd [start [end]]]
|
||||
@deffnx {C Function} scm_uniform_vector_read_x (uvec, port_or_fd, start, end)
|
||||
Fill the elements of @var{uvec} by reading
|
||||
raw bytes from @var{port-or-fdes}, using host byte order.
|
||||
|
||||
The optional arguments @var{start} (inclusive) and @var{end}
|
||||
(exclusive) allow a specified region to be read,
|
||||
leaving the remainder of the vector unchanged.
|
||||
|
||||
When @var{port-or-fdes} is a port, all specified elements
|
||||
of @var{uvec} are attempted to be read, potentially blocking
|
||||
while waiting formore input or end-of-file.
|
||||
When @var{port-or-fd} is an integer, a single call to
|
||||
read(2) is made.
|
||||
|
||||
An error is signalled when the last element has only
|
||||
been partially filled before reaching end-of-file or in
|
||||
the single call to read(2).
|
||||
|
||||
@code{uniform-vector-read!} returns the number of elements
|
||||
read.
|
||||
|
||||
@var{port-or-fdes} may be omitted, in which case it defaults
|
||||
to the value returned by @code{(current-input-port)}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector-write uvec [port_or_fd [start [end]]]
|
||||
@deffnx {C Function} scm_uniform_vector_write (uvec, port_or_fd, start, end)
|
||||
Write the elements of @var{uvec} as raw bytes to
|
||||
@var{port-or-fdes}, in the host byte order.
|
||||
|
||||
The optional arguments @var{start} (inclusive)
|
||||
and @var{end} (exclusive) allow
|
||||
a specified region to be written.
|
||||
|
||||
When @var{port-or-fdes} is a port, all specified elements
|
||||
of @var{uvec} are attempted to be written, potentially blocking
|
||||
while waiting for more room.
|
||||
When @var{port-or-fd} is an integer, a single call to
|
||||
write(2) is made.
|
||||
|
||||
An error is signalled when the last element has only
|
||||
been partially written in the single call to write(2).
|
||||
|
||||
The number of objects actually written is returned.
|
||||
@var{port-or-fdes} may be
|
||||
omitted, in which case it defaults to the value returned by
|
||||
@code{(current-output-port)}.
|
||||
@end deffn
|
||||
|
||||
|
||||
@node Bit Vectors
|
||||
@subsection Bit Vectors
|
||||
|
||||
|
|
|
@ -81,6 +81,11 @@ this mechanism.
|
|||
Return an association list of statistics about Guile's current
|
||||
use of storage.
|
||||
|
||||
@deffn {Scheme Procedure} gc-live-object-stats
|
||||
@deffnx {C Function} scm_gc_live_object_stats ()
|
||||
Return an alist of statistics of the current live objects.
|
||||
@end deffn
|
||||
|
||||
@deftypefun void scm_gc_mark (SCM @var{x})
|
||||
Mark the object @var{x}, and recurse on any objects @var{x} refers to.
|
||||
If @var{x}'s mark bit is already set, return immediately. This function
|
||||
|
|
|
@ -204,7 +204,7 @@ The non-local flow of control caused by continuations might sometimes
|
|||
not be wanted. You can use @code{with-continuation-barrier} etc to
|
||||
errect fences that continuations can not pass.
|
||||
|
||||
@deffn {Sheme Procedure} with-continuation-barrier proc
|
||||
@deffn {Scheme Procedure} with-continuation-barrier proc
|
||||
@deffnx {C Function} scm_with_continuation_barrier (proc)
|
||||
Call @var{proc} and return its result. Do not allow the invocation of
|
||||
continuations that would leave or enter the dynamic extent of the call
|
||||
|
@ -659,14 +659,17 @@ in all threads is one way to avoid such problems.
|
|||
|
||||
@sp 1
|
||||
@deffn {Scheme Procedure} make-mutex
|
||||
@deffnx {C Function} scm_make_mutex ()
|
||||
Return a new standard mutex. It is initially unlocked.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} make-recursive-mutex
|
||||
Return a new recursive mutex. It is initialloy unlocked.
|
||||
@deffnx {C Function} scm_make_recursive_mutex ()
|
||||
Create a new recursive mutex. It is initialloy unlocked.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} lock-mutex mutex
|
||||
@deffnx {C Function} scm_lock_mutex (mutex)
|
||||
Lock @var{mutex}. If the mutex is already locked by another thread
|
||||
then block and return only when @var{mutex} has been acquired.
|
||||
|
||||
|
@ -683,7 +686,8 @@ blocked in @code{lock-mutex}, the wait is interrupted and the async is
|
|||
executed. When the async returns, the wait resumes.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} try-mutex mutex
|
||||
@deffn {Scheme Procedure} try-mutex mx
|
||||
@deffnx {C Function} scm_try_mutex (mx)
|
||||
Try to lock @var{mutex} as per @code{lock-mutex}. If @var{mutex} can
|
||||
be acquired immediately then this is done and the return is @code{#t}.
|
||||
If @var{mutex} is locked by some other thread then nothing is done and
|
||||
|
@ -691,18 +695,19 @@ the return is @code{#f}.
|
|||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} unlock-mutex mutex
|
||||
@deffnx {C Function} scm_unlock_mutex (mutex)
|
||||
Unlock @var{mutex}. An error is signalled if @var{mutex} is not
|
||||
locked by the calling thread.
|
||||
@end deffn
|
||||
|
||||
@c begin (texi-doc-string "guile" "make-condition-variable")
|
||||
@deffn {Scheme Procedure} make-condition-variable
|
||||
@deffnx {C Function} scm_make_condition_variable ()
|
||||
Return a new condition variable.
|
||||
@end deffn
|
||||
|
||||
@c begin (texi-doc-string "guile" "wait-condition-variable")
|
||||
@deffn {Scheme Procedure} wait-condition-variable cond-var mutex [time]
|
||||
Wait until @var{cond-var} has been signalled. While waiting,
|
||||
@deffn {Scheme Procedure} wait-condition-variable condvar mutex [time]
|
||||
@deffnx {C Function} scm_wait_condition_variable (condvar, mutex, time)
|
||||
Wait until @var{condvar} has been signalled. While waiting,
|
||||
@var{mutex} is atomically unlocked (as with @code{unlock-mutex}) and
|
||||
is locked again when this function returns. When @var{time} is given,
|
||||
it specifies a point in time where the waiting should be aborted. It
|
||||
|
@ -720,14 +725,14 @@ the thread block while re-acquiring the mutex, execution of asyncs is
|
|||
blocked.
|
||||
@end deffn
|
||||
|
||||
@c begin (texi-doc-string "guile" "signal-condition-variable")
|
||||
@deffn {Scheme Procedure} signal-condition-variable cond-var
|
||||
Wake up one thread that is waiting for @var{cv}.
|
||||
@deffn {Scheme Procedure} signal-condition-variable condvar
|
||||
@deffnx {C Function} scm_signal_condition_variable (condvar)
|
||||
Wake up one thread that is waiting for @var{condvar}.
|
||||
@end deffn
|
||||
|
||||
@c begin (texi-doc-string "guile" "broadcast-condition-variable")
|
||||
@deffn {Scheme Procedure} broadcast-condition-variable cond-var
|
||||
Wake up all threads that are waiting for @var{cv}.
|
||||
@deffn {Scheme Procedure} broadcast-condition-variable condvar
|
||||
@deffnx {C Function} scm_broadcast_condition_variable (condvar)
|
||||
Wake up all threads that are waiting for @var{condvar}.
|
||||
@end deffn
|
||||
|
||||
@sp 1
|
||||
|
|
|
@ -855,3 +855,140 @@ Return the dash symbol for @var{keyword}.
|
|||
This is the inverse of @code{make-keyword-from-dash-symbol}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} dimensions->uniform-array dims prot [fill]
|
||||
@deffnx {Scheme Procedure} make-uniform-vector length prototype [fill]
|
||||
@deffnx {C Function} scm_dimensions_to_uniform_array (dims, prot, fill)
|
||||
Create and return a uniform array or vector of type
|
||||
corresponding to @var{prototype} with dimensions @var{dims} or
|
||||
length @var{length}. If @var{fill} is supplied, it's used to
|
||||
fill the array, otherwise @var{prototype} is used.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} list->uniform-array ndim prot lst
|
||||
@deffnx {C Function} scm_list_to_uniform_array (ndim, prot, lst)
|
||||
Return a uniform array of the type indicated by prototype
|
||||
@var{prot} with elements the same as those of @var{lst}.
|
||||
Elements must be of the appropriate type, no coercions are
|
||||
done.
|
||||
|
||||
The argument @var{ndim} determines the number of dimensions
|
||||
of the array. It is either an exact integer, giving the
|
||||
number directly, or a list of exact integers, whose length
|
||||
specifies the number of dimensions and each element is the
|
||||
lower index bound of its dimension.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} array-prototype ra
|
||||
@deffnx {C Function} scm_array_prototype (ra)
|
||||
Return an object that would produce an array of the same type
|
||||
as @var{array}, if used as the @var{prototype} for
|
||||
@code{make-uniform-array}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} call-with-dynamic-root thunk handler
|
||||
@deffnx {C Function} scm_call_with_dynamic_root (thunk, handler)
|
||||
Call @var{thunk} with a new dynamic state and withina continuation barrier. The @var{handler} catches allotherwise uncaught throws and executes within the samedynamic context as @var{thunk}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} dynamic-root
|
||||
@deffnx {C Function} scm_dynamic_root ()
|
||||
Return an object representing the current dynamic root.
|
||||
|
||||
These objects are only useful for comparison using @code{eq?}.
|
||||
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector? obj
|
||||
@deffnx {C Function} scm_uniform_vector_p (obj)
|
||||
Return @code{#t} if @var{obj} is a uniform vector.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector-ref v idx
|
||||
@deffnx {C Function} scm_uniform_vector_ref (v, idx)
|
||||
Return the element at index @var{idx} of the
|
||||
homogenous numeric vector @var{v}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector-set! v idx val
|
||||
@deffnx {C Function} scm_uniform_vector_set_x (v, idx, val)
|
||||
Set the element at index @var{idx} of the
|
||||
homogenous numeric vector @var{v} to @var{val}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector->list uvec
|
||||
@deffnx {C Function} scm_uniform_vector_to_list (uvec)
|
||||
Convert the uniform numeric vector @var{uvec} to a list.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector-length v
|
||||
@deffnx {C Function} scm_uniform_vector_length (v)
|
||||
Return the number of elements in the uniform vector @var{v}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} make-u8vector len [fill]
|
||||
@deffnx {C Function} scm_make_u8vector (len, fill)
|
||||
Return a newly allocated uniform numeric vector which can
|
||||
hold @var{len} elements. If @var{fill} is given, it is used to
|
||||
initialize the elements, otherwise the contents of the vector
|
||||
is unspecified.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} u8vector . l
|
||||
@deffnx {C Function} scm_u8vector (l)
|
||||
Return a newly allocated uniform numeric vector containing
|
||||
all argument values.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} list->u8vector l
|
||||
@deffnx {C Function} scm_list_to_u8vector (l)
|
||||
Convert the list @var{l} to a numeric uniform vector.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} any->u8vector obj
|
||||
@deffnx {C Function} scm_any_to_u8vector (obj)
|
||||
Convert @var{obj}, which can be a list, vector, or
|
||||
uniform vector, to a numeric uniform vector of
|
||||
type u8.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} string-any-c-code char_pred s [start [end]]
|
||||
@deffnx {C Function} scm_string_any (char_pred, s, start, end)
|
||||
Check if the predicate @var{pred} is true for any character in
|
||||
the string @var{s}.
|
||||
|
||||
Calls to @var{pred} are made from left to right across @var{s}.
|
||||
When it returns true (ie.@: non-@code{#f}), that return value
|
||||
is the return from @code{string-any}.
|
||||
|
||||
The SRFI-13 specification requires that the call to @var{pred}
|
||||
on the last character of @var{s} (assuming that point is
|
||||
reached) be a tail call, but currently in Guile this is not the
|
||||
case.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} string-every-c-code char_pred s [start [end]]
|
||||
@deffnx {C Function} scm_string_every (char_pred, s, start, end)
|
||||
Check if the predicate @var{pred} is true for every character
|
||||
in the string @var{s}.
|
||||
|
||||
Calls to @var{pred} are made from left to right across @var{s}.
|
||||
If the predicate is true for every character then the return
|
||||
value from the last @var{pred} call is the return from
|
||||
@code{string-every}.
|
||||
|
||||
If there are no characters in @var{s} (ie.@: @var{start} equals
|
||||
@var{end}) then the return is @code{#t}.
|
||||
|
||||
The SRFI-13 specification requires that the call to @var{pred}
|
||||
on the last character of @var{s} (assuming that point is
|
||||
reached) be a tail call, but currently in Guile this is not the
|
||||
case.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} inf? x
|
||||
@deffnx {C Function} scm_inf_p (x)
|
||||
Return @code{#t} if @var{x} is either @samp{+inf.0}
|
||||
or @samp{-inf.0}, @code{#f} otherwise.
|
||||
@end deffn
|
||||
|
||||
|
||||
|
|
|
@ -1,274 +1,3 @@
|
|||
@c module-for-docstring (guile)
|
||||
|
||||
@c This one crops up here constantly although it is already
|
||||
@c in api-data.texi. Have to investigate somewhen.
|
||||
|
||||
@deffn {Scheme Procedure} inf? x
|
||||
@deffnx {C Function} scm_inf_p (x)
|
||||
Return @code{#t} if @var{x} is either @samp{+inf.0}
|
||||
or @samp{-inf.0}, @code{#f} otherwise.
|
||||
@end deffn
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector? obj
|
||||
@deffnx {C Function} scm_uniform_vector_p (obj)
|
||||
Return @code{#t} if @var{obj} is a uniform vector.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector-set! v idx val
|
||||
@deffnx {C Function} scm_uniform_vector_set_x (v, idx, val)
|
||||
Set the element at index @var{idx} of the
|
||||
homogenous numeric vector @var{v} to @var{val}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector->list uvec
|
||||
@deffnx {C Function} scm_uniform_vector_to_list (uvec)
|
||||
Convert the homogeneous numeric vector @var{uvec} to a list.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} make-u8vector len [fill]
|
||||
@deffnx {C Function} scm_make_u8vector (len, fill)
|
||||
Return a newly allocated uniform numeric vector which can
|
||||
hold @var{len} elements. If @var{fill} is given, it is used to
|
||||
initialize the elements, otherwise the contents of the vector
|
||||
is unspecified.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} u8vector . l
|
||||
@deffnx {C Function} scm_u8vector (l)
|
||||
Return a newly allocated uniform numeric vector containing
|
||||
all argument values.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} list->u8vector l
|
||||
@deffnx {C Function} scm_list_to_u8vector (l)
|
||||
Convert the list @var{l} to a numeric uniform vector.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} any->u8vector obj
|
||||
@deffnx {C Function} scm_any_to_u8vector (obj)
|
||||
Convert @var{obj}, which can be a list, vector, or
|
||||
uniform vector, to a numeric uniform vector of
|
||||
type u8.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} with-continuation-barrier proc
|
||||
@deffnx {C Function} scm_with_continuation_barrier (proc)
|
||||
Call @var{proc} and return the returned value but do not allow the invocation of continuations that would exit or reenter the dynamic extent of the call to @var{proc}. When a uncaught throw happens during the call to @var{proc}, a message is printed to the current error port and @code{#f} is returned.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} dynamic-state? obj
|
||||
@deffnx {C Function} scm_dynamic_state_p (obj)
|
||||
Return @code{#t} if @var{obj} is a dynamic state object;
|
||||
return @code{#f} otherwise
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} current-dynamic-state
|
||||
@deffnx {C Function} scm_current_dynamic_state ()
|
||||
Return the current dynamic state object.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} set-current-dynamic-state state
|
||||
@deffnx {C Function} scm_set_current_dynamic_state (state)
|
||||
Set the current dynamic state object to @var{state}
|
||||
and return the previous current dynamic state object.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} with-dynamic-state state proc
|
||||
@deffnx {C Function} scm_with_dynamic_state (state, proc)
|
||||
Call @var{proc} while @var{state} is the current dynamic
|
||||
state object.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} call-with-dynamic-root thunk handler
|
||||
@deffnx {C Function} scm_call_with_dynamic_root (thunk, handler)
|
||||
Evaluate @code{(thunk)} in a new dynamic context, returning its value.
|
||||
|
||||
If an error occurs during evaluation, apply @var{handler} to the
|
||||
arguments to the throw, just as @code{throw} would. If this happens,
|
||||
@var{handler} is called outside the scope of the new root -- it is
|
||||
called in the same dynamic context in which
|
||||
@code{call-with-dynamic-root} was evaluated.
|
||||
|
||||
If @var{thunk} captures a continuation, the continuation is rooted at
|
||||
the call to @var{thunk}. In particular, the call to
|
||||
@code{call-with-dynamic-root} is not captured. Therefore,
|
||||
@code{call-with-dynamic-root} always returns at most one time.
|
||||
|
||||
Before calling @var{thunk}, the dynamic-wind chain is un-wound back to
|
||||
the root and a new chain started for @var{thunk}. Therefore, this call
|
||||
may not do what you expect:
|
||||
|
||||
@lisp
|
||||
;; Almost certainly a bug:
|
||||
(with-output-to-port
|
||||
some-port
|
||||
|
||||
(lambda ()
|
||||
(call-with-dynamic-root
|
||||
(lambda ()
|
||||
(display 'fnord)
|
||||
(newline))
|
||||
(lambda (errcode) errcode))))
|
||||
@end lisp
|
||||
|
||||
The problem is, on what port will @samp{fnord} be displayed? You
|
||||
might expect that because of the @code{with-output-to-port} that
|
||||
it will be displayed on the port bound to @code{some-port}. But it
|
||||
probably won't -- before evaluating the thunk, dynamic winds are
|
||||
unwound, including those created by @code{with-output-to-port}.
|
||||
So, the standard output port will have been re-set to its default value
|
||||
before @code{display} is evaluated.
|
||||
|
||||
(This function was added to Guile mostly to help calls to functions in C
|
||||
libraries that can not tolerate non-local exits or calls that return
|
||||
multiple times. If such functions call back to the interpreter, it should
|
||||
be under a new dynamic root.)
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} dynamic-root
|
||||
@deffnx {C Function} scm_dynamic_root ()
|
||||
Return an object representing the current dynamic root.
|
||||
|
||||
These objects are only useful for comparison using @code{eq?}.
|
||||
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector-ref v idx
|
||||
@deffnx {C Function} scm_uniform_vector_ref (v, idx)
|
||||
Return the element at index @var{idx} of the
|
||||
homogenous numeric vector @var{v}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector-length v
|
||||
@deffnx {C Function} scm_uniform_vector_length (v)
|
||||
Return the number of elements in the uniform vector @var{v}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector-read! uvec [port_or_fd [start [end]]]
|
||||
@deffnx {C Function} scm_uniform_vector_read_x (uvec, port_or_fd, start, end)
|
||||
Fill the elements of @var{uvec} by reading
|
||||
raw bytes from @var{port-or-fdes}, using host byte order.
|
||||
|
||||
The optional arguments @var{start} (inclusive) and @var{end}
|
||||
(exclusive) allow a specified region to be read,
|
||||
leaving the remainder of the vector unchanged.
|
||||
|
||||
When @var{port-or-fdes} is a port, all specified elements
|
||||
of @var{uvec} are attempted to be read, potentially blocking
|
||||
while waiting formore input or end-of-file.
|
||||
When @var{port-or-fd} is an integer, a single call to
|
||||
read(2) is made.
|
||||
|
||||
An error is signalled when the last element has only
|
||||
been partially filled before reaching end-of-file or in
|
||||
the single call to read(2).
|
||||
|
||||
@code{uniform-vector-read!} returns the number of elements
|
||||
read.
|
||||
|
||||
@var{port-or-fdes} may be omitted, in which case it defaults
|
||||
to the value returned by @code{(current-input-port)}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} uniform-vector-write uvec [port_or_fd [start [end]]]
|
||||
@deffnx {C Function} scm_uniform_vector_write (uvec, port_or_fd, start, end)
|
||||
Write the elements of @var{uvec} as raw bytes to
|
||||
@var{port-or-fdes}, in the host byte order.
|
||||
|
||||
The optional arguments @var{start} (inclusive)
|
||||
and @var{end} (exclusive) allow
|
||||
a specified region to be written.
|
||||
|
||||
When @var{port-or-fdes} is a port, all specified elements
|
||||
of @var{uvec} are attempted to be written, potentially blocking
|
||||
while waiting for more room.
|
||||
When @var{port-or-fd} is an integer, a single call to
|
||||
write(2) is made.
|
||||
|
||||
An error is signalled when the last element has only
|
||||
been partially written in the single call to write(2).
|
||||
|
||||
The number of objects actually written is returned.
|
||||
@var{port-or-fdes} may be
|
||||
omitted, in which case it defaults to the value returned by
|
||||
@code{(current-output-port)}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} string-any-c-code char_pred s [start [end]]
|
||||
@deffnx {C Function} scm_string_any (char_pred, s, start, end)
|
||||
Check if the predicate @var{pred} is true for any character in
|
||||
the string @var{s}.
|
||||
|
||||
Calls to @var{pred} are made from left to right across @var{s}.
|
||||
When it returns true (ie.@: non-@code{#f}), that return value
|
||||
is the return from @code{string-any}.
|
||||
|
||||
The SRFI-13 specification requires that the call to @var{pred}
|
||||
on the last character of @var{s} (assuming that point is
|
||||
reached) be a tail call, but currently in Guile this is not the
|
||||
case.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} string-every-c-code char_pred s [start [end]]
|
||||
@deffnx {C Function} scm_string_every (char_pred, s, start, end)
|
||||
Check if the predicate @var{pred} is true for every character
|
||||
in the string @var{s}.
|
||||
|
||||
Calls to @var{pred} are made from left to right across @var{s}.
|
||||
If the predicate is true for every character then the return
|
||||
value from the last @var{pred} call is the return from
|
||||
@code{string-every}.
|
||||
|
||||
If there are no characters in @var{s} (ie.@: @var{start} equals
|
||||
@var{end}) then the return is @code{#t}.
|
||||
|
||||
The SRFI-13 specification requires that the call to @var{pred}
|
||||
on the last character of @var{s} (assuming that point is
|
||||
reached) be a tail call, but currently in Guile this is not the
|
||||
case.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} make-recursive-mutex
|
||||
@deffnx {C Function} scm_make_recursive_mutex ()
|
||||
Create a new recursive mutex.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} vector-copy vec
|
||||
@deffnx {C Function} scm_vector_copy (vec)
|
||||
Return a copy of @var{vec}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} dimensions->uniform-array dims prot [fill]
|
||||
@deffnx {Scheme Procedure} make-uniform-vector length prototype [fill]
|
||||
@deffnx {C Function} scm_dimensions_to_uniform_array (dims, prot, fill)
|
||||
Create and return a uniform array or vector of type
|
||||
corresponding to @var{prototype} with dimensions @var{dims} or
|
||||
length @var{length}. If @var{fill} is supplied, it's used to
|
||||
fill the array, otherwise @var{prototype} is used.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} list->uniform-array ndim prot lst
|
||||
@deffnx {C Function} scm_list_to_uniform_array (ndim, prot, lst)
|
||||
Return a uniform array of the type indicated by prototype
|
||||
@var{prot} with elements the same as those of @var{lst}.
|
||||
Elements must be of the appropriate type, no coercions are
|
||||
done.
|
||||
|
||||
The argument @var{ndim} determines the number of dimensions
|
||||
of the array. It is either an exact integer, giving the
|
||||
number directly, or a list of exact integers, whose length
|
||||
specifies the number of dimensions and each element is the
|
||||
lower index bound of its dimension.
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} array-prototype ra
|
||||
@deffnx {C Function} scm_array_prototype (ra)
|
||||
Return an object that would produce an array of the same type
|
||||
as @var{array}, if used as the @var{prototype} for
|
||||
@code{make-uniform-array}.
|
||||
@end deffn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue