A parameterization is a set of parameter values. Each thread has its own initial parameterization, which is extended functionally and superseded by parameterizations that are attached to a particular continuation mark.
To obtain parameter values, a Scheme_Config is combined with the current threads Scheme_Thread_Cell_Table, as stored in the thread record's cell_values field.
Parameter values for built-in parameters are obtained and modified (for the current thread) using scheme_get_param and scheme_set_param. Each parameter is stored as a Scheme_Object * value, and the built-in parameters are accessed through the following indices:
To get or set a parameter value for a thread other than the current one, use scheme_get_thread_param and scheme_set_thread_param, each of which takes a Scheme_Thread_Cell_Table to use in resolving or setting a parameter value.
When installing a new parameter with scheme_set_param, no
check is performed on the supplied value to ensure that it is a legal
value for the parameter; this is the responsibility of the caller of
scheme_set_param. Note that Boolean parameters should only be
set to the values
Gets the current value (for the current thread) of the parameter
Sets the current value (for the current thread) of the parameter
Like scheme_get_param, but using an arbitrary thread's cell-value table.
Like scheme_set_param, but using an arbitrary thread's cell-value table.
Creates and returns a parameterization that extends
base with a
v (in all threads) for the parameter
param_id. Use scheme_install_config to make this
configuration active in the current thread.
Adjusts the current thread's continuation marks to make
the current parameterization. Typically, this function is called
after scheme_push_continuation_frame to establish a new
continuation frame, and then scheme_pop_continuation_frame
is called later to remove the frame (and thus the parameterization).
Creates a new thread-cell-value table, copying values for preserved
thread cells from
Use this function instead of the other primitive-constructing functions, like scheme_make_prim, to create a primitive parameter procedure. See also scheme_param_config, below. This function is only available to embedding applications (i.e., not extensions).
Call this procedure in a primitive parameter procedure to implement
the work of getting or setting the parameter. The
should be the parameter procedure name; it is used to report
param argument is a fixnum corresponding to the
primitive parameter index returned by scheme_new_param. The
argv arguments should be the un-touched and
un-tested arguments that were passed to the primitive parameter.
Argument-checking is performed within scheme_param_config
arityis non-negative, potential parameter values must be able to accept the specified number of arguments. The
expectedarguments should be NULL.
checkis not NULL, it is called to check a potential parameter value. The arguments passed to
checkare always 1 and an array that contains the potential parameter value. If
isboolis 0 and
checkreturns scheme_false, then a type error is reported using
isboolis 1, then a type error is reported only when
checkreturns NULL and any non-NULL return value is used as the actual value to be stored for the parameter.
isboolshould be 1. A potential procedure argument is then treated as a Boolean value.
This function is only available to embedding applications (i.e., not extensions).