ecl_set_option
— Set a boot option.
void ecl_set_option(
int option, cl_fixnum value)
;
| An integer from Table 8.1. |
| A cl_index value for this option. |
This functions sets the value of different options that have to be customized before ECL boots. The table of options and default values [Table 8.1] shows that some of them are boolean, and some of them are unsigned integers.
We distinguish three sets of values. The first set determines whether ECL handles certain exceptions, such as access to forbidden regions of memory, interrupts via , floating point exceptions, etc.
The second set is related to the sizes of different stacks. Currently ECL uses four stacks: a bind stack for keeping assignments to special variables; a frame stack for implementing blocks, tagbodys and catch points; an interpreter stack for evaluating bytecodes, and finally the machine or C stack, of the computer we run in. We can set the expected size of these stacks, together with the size of a safety area which, if penetrated, will lead to the generation of a correctable error.
Table 8.1. Boot options for embedded ECL
Name (ECL_OPT_* ) | Type | Default | Description |
---|---|---|---|
INCREMENTAL_GC | boolean | TRUE | Activate generational garbage collector. |
TRAP_SIGSEGV | boolean | TRUE | Capture SIGSEGV signals. |
TRAP_SIGFPE | boolean | TRUE | Capture floating point exceptions. |
TRAP_SIGINT | boolean | TRUE | Capture user interrupts. |
TRAP_SIGILL | boolean | TRUE | Capture SIGILL exception. |
TRAP_INTERRUPT_SIGNAL | boolean | TRUE | Capture the signal that implements
mp:interrupt-process . |
SIGNAL_HANDLING_THREAD | boolean | TRUE | Create a signal to capture and process asynchronous threads (See Section 7.3.1). |
BOOTED | boolean | TRUE/FALSE | Has ECL booted (read only). |
BIND_STACK_SIZE | cl_index | 8192 | Size of stack for binding special variables. |
BIND_STACK_SAFETY_AREA | cl_index | 128 | |
FRAME_STACK_SIZE | cl_index | 2048 | Size of stack for nonlocal jumps. |
FRAME_STACK_SAFETY_AREA | cl_index | 128 | |
LISP_STACK_SIZE | cl_index | 32768 | Size of interpreter stack. |
LISP_STACK_SAFETY_AREA | cl_index | 128 | |
C_STACK_SIZE | cl_index | 131072 | Size of C stack (not exact). |
C_STACK_SAFETY_AREA | cl_index | 4192 | |
SIGALTSTACK_SIZE | cl_index | 1 | If nonzero, run C signal handler in an alternative signal. A small value is automatically incremented. |
THREAD_INTERRUPT_SIGNAL | unsigned int | 0 | If nonzero, specify the unix signal which is used to communicate different Lisp threads. |