Remove *ALLOCATION-POINTER* Lisp symbol from x86 backends
[sbcl.git] / src / runtime / globals.c
blobb291c436687667f8589105c59e31931dbea63684
1 /*
2 * variables everybody needs to look at or frob on
3 */
5 /*
6 * This software is part of the SBCL system. See the README file for
7 * more information.
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.
16 #include <stdio.h>
17 #include <sys/types.h>
18 #include <unistd.h>
20 #include "sbcl.h"
21 #include "runtime.h"
22 #include "globals.h"
23 #include "validate.h"
25 #ifndef LISP_FEATURE_SB_THREAD
26 int foreign_function_call_active;
27 #endif
29 #if !defined(LISP_FEATURE_SB_THREAD)
30 lispobj *current_control_stack_pointer;
31 #endif
32 #if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64) || !defined(LISP_FEATURE_SB_THREAD)
33 lispobj *current_control_frame_pointer;
34 #endif
35 #if !defined(BINDING_STACK_POINTER) && !defined(LISP_FEATURE_SB_THREAD)
36 lispobj *current_binding_stack_pointer;
37 #endif
39 /* ARM backends use ALLOCATION-POINTER, not dynamic_space_free_pointer */
41 # if !defined(LISP_FEATURE_ARM) && !defined(LISP_FEATURE_ARM64)
42 /* The Object Formerly Known As current_dynamic_space_free_pointer */
43 lispobj *dynamic_space_free_pointer;
44 #endif
45 lispobj *read_only_space_free_pointer;
46 lispobj *static_space_free_pointer;
47 #ifdef LISP_FEATURE_IMMOBILE_SPACE
48 lispobj *immobile_space_free_pointer;
49 lispobj *immobile_fixedobj_free_pointer;
50 #endif
51 os_vm_address_t anon_dynamic_space_start;
53 #ifndef LISP_FEATURE_GENCGC /* GENCGC has its own way to record trigger */
54 lispobj *current_auto_gc_trigger;
55 #endif
57 /* For cheneygc, this points to the start of the semi-space currently in use
58 * (that will become the from_space when the next GC is done).
59 * Gencgc defines it as DYNAMIC_SPACE_START via a C preprocessor macro. */
60 #ifdef LISP_FEATURE_CHENEYGC
61 lispobj *current_dynamic_space;
62 #endif
64 #if defined(LISP_FEATURE_SB_THREAD) && !defined(LISP_FEATURE_GCC_TLS)
65 pthread_key_t specials=0;
66 #endif
68 void globals_init(void)
70 /* Space, stack, and free pointer vars are initialized by
71 * validate() and coreparse(). */
72 #if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64) || !defined(LISP_FEATURE_SB_THREAD)
73 current_control_frame_pointer = (lispobj *)0;
74 #endif
76 #ifndef LISP_FEATURE_GENCGC
77 /* no GC trigger yet */
78 current_auto_gc_trigger = NULL;
79 #endif
81 #ifndef LISP_FEATURE_SB_THREAD
82 #if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)
83 /* KLUDGE: x86oids always think they're in lisp code. See the
84 * comment at the bottom of
85 * interrupt.c/fake_foreign_function_call() and the lack of any
86 * access to foreign_function_call_active or the corresponding
87 * thread slot in x86{,-64}-assem.S. */
88 foreign_function_call_active = 0;
89 #else
90 foreign_function_call_active = 1;
91 #endif
92 #endif
94 #if defined(LISP_FEATURE_SB_THREAD) && !defined(LISP_FEATURE_GCC_TLS)
95 pthread_key_create(&specials,0);
96 #endif