Name

ecl_set_option — Set a boot option.

Function

void ecl_set_option( int option, cl_fixnum value);

option

An integer from Table 8.1.

value

A cl_index value for this option.

Description

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_*)TypeDefaultDescription
INCREMENTAL_GCbooleanTRUEActivate generational garbage collector.
TRAP_SIGSEGVbooleanTRUECapture SIGSEGV signals.
TRAP_SIGFPEbooleanTRUECapture floating point exceptions.
TRAP_SIGINTbooleanTRUECapture user interrupts.
TRAP_SIGILLbooleanTRUECapture SIGILL exception.
TRAP_INTERRUPT_SIGNALbooleanTRUECapture the signal that implements mp:interrupt-process.
SIGNAL_HANDLING_THREADbooleanTRUECreate a signal to capture and process asynchronous threads (See Section 7.3.1).
BOOTEDbooleanTRUE/FALSEHas ECL booted (read only).
BIND_STACK_SIZEcl_index8192Size of stack for binding special variables.
BIND_STACK_SAFETY_AREAcl_index128 
FRAME_STACK_SIZEcl_index2048Size of stack for nonlocal jumps.
FRAME_STACK_SAFETY_AREAcl_index128 
LISP_STACK_SIZEcl_index32768Size of interpreter stack.
LISP_STACK_SAFETY_AREAcl_index128 
C_STACK_SIZEcl_index131072Size of C stack (not exact).
C_STACK_SAFETY_AREAcl_index4192 
SIGALTSTACK_SIZEcl_index1If nonzero, run C signal handler in an alternative signal. A small value is automatically incremented.
THREAD_INTERRUPT_SIGNALunsigned int0If nonzero, specify the unix signal which is used to communicate different Lisp threads.