0.6.7.14: Some constant C vars are now constants.
[sbcl.git] / src / runtime / globals.c
1 /*
2  * variables everybody needs to look at or frob on
3  */
4
5 /*
6  * This software is part of the SBCL system. See the README file for
7  * more information.
8  *
9  * This software is derived from the CMU CL system, which was
10  * written at Carnegie Mellon University and released into the
11  * public domain. The software is in the public domain and is
12  * provided with absolutely no warranty. See the COPYING and CREDITS
13  * files for more information.
14  */
15
16 /*
17  * $Header$
18  */
19
20 #include <stdio.h>
21
22 #include "runtime.h"
23 #include "sbcl.h"
24 #include "globals.h"
25
26 int foreign_function_call_active;
27
28 lispobj *current_control_stack_pointer;
29 lispobj *current_control_frame_pointer;
30 #ifndef BINDING_STACK_POINTER
31 lispobj *current_binding_stack_pointer;
32 #endif
33
34 lispobj *control_stack;
35 #ifdef __i386__
36 lispobj *control_stack_end;
37 #endif
38
39 #ifndef ALLOCATION_POINTER
40 lispobj *dynamic_space_free_pointer;
41 #endif
42 #ifndef INTERNAL_GC_TRIGGER
43 lispobj *current_auto_gc_trigger;
44 #endif
45
46 void globals_init(void)
47 {
48     /* Space, stack, and free pointer vars are initialized by
49      * validate() and coreparse(). */
50
51 #ifndef INTERNAL_GC_TRIGGER
52     /* no GC trigger yet */
53     current_auto_gc_trigger = NULL;
54 #endif
55
56     /* Set foreign function call active. */
57     foreign_function_call_active = 1;
58
59     /* Initialize the current Lisp state. */
60 #ifndef __i386__
61     current_control_stack_pointer = control_stack;
62 #else
63     current_control_stack_pointer = control_stack_end;
64 #endif
65
66     current_control_frame_pointer = (lispobj *)0;
67 #ifndef BINDING_STACK_POINTER
68     current_binding_stack_pointer = BINDING_STACK_START;
69 #endif
70 }