2 * variables everybody needs to look at or frob on
6 * This software is part of the SBCL system. See the README file for
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.
17 #include <sys/types.h>
25 #ifndef LISP_FEATURE_SB_THREAD
26 int foreign_function_call_active
;
29 #if !defined(LISP_FEATURE_SB_THREAD)
30 lispobj
*current_control_stack_pointer
;
32 #if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64) || !defined(LISP_FEATURE_SB_THREAD)
33 lispobj
*current_control_frame_pointer
;
35 #if !defined(BINDING_STACK_POINTER) && !defined(LISP_FEATURE_SB_THREAD)
36 lispobj
*current_binding_stack_pointer
;
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
;
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
;
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
;
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
;
64 #if defined(LISP_FEATURE_SB_THREAD) && !defined(LISP_FEATURE_GCC_TLS)
65 pthread_key_t specials
=0;
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;
76 #ifndef LISP_FEATURE_GENCGC
77 /* no GC trigger yet */
78 current_auto_gc_trigger
= NULL
;
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;
90 foreign_function_call_active
= 1;
94 #if defined(LISP_FEATURE_SB_THREAD) && !defined(LISP_FEATURE_GCC_TLS)
95 pthread_key_create(&specials
,0);