2 * This software is part of the SBCL system. See the README file for
5 * This software is derived from the CMU CL system, which was
6 * written at Carnegie Mellon University and released into the
7 * public domain. The software is in the public domain and is
8 * provided with absolutely no warranty. See the COPYING and CREDITS
9 * files for more information.
12 #ifndef _INCLUDED_GLOBALS_H_
13 #define _INCLUDED_GLOBALS_H_
15 #ifndef LANGUAGE_ASSEMBLY
16 # include <sys/types.h>
23 #ifndef LANGUAGE_ASSEMBLY
24 extern int foreign_function_call_active;
25 extern boolean stop_the_world;
27 #if defined(LISP_FEATURE_SB_THREAD)
28 extern pthread_key_t specials;
31 extern lispobj *current_control_stack_pointer;
32 extern lispobj *current_control_frame_pointer;
33 # if !defined(LISP_FEATURE_X86) && !defined(LISP_FEATURE_X86_64)
34 extern lispobj *current_binding_stack_pointer;
37 #if !defined(LISP_FEATURE_X86) && !defined(LISP_FEATURE_X86_64)
38 /* This is unused on X86 and X86_64, but is used as the global
39 * allocation pointer by the cheney GC, and, in some instances, as
40 * the global allocation pointer on PPC/GENCGC. This should probably
41 * be cleaned up such that it only needs to exist on cheney. At the
42 * moment, it is also used by the GENCGC, to hold the pseudo_atomic
43 * bits, and is tightly coupled to reg_ALLOC by the assembly
45 extern lispobj *dynamic_space_free_pointer;
48 # ifndef LISP_FEATURE_GENCGC
49 extern lispobj *current_auto_gc_trigger;
52 extern lispobj *current_dynamic_space;
54 extern void globals_init(void);
56 #else /* LANGUAGE_ASSEMBLY */
58 # ifdef LISP_FEATURE_MIPS
60 # define EXTERN(name,bytes) .globl name
62 # define EXTERN(name,bytes) .extern name bytes
66 # ifdef LISP_FEATURE_SPARC
68 # define EXTERN(name,bytes) .global name
70 # define EXTERN(name,bytes) .global _ ## name
74 # ifdef LISP_FEATURE_ALPHA
76 # define EXTERN(name,bytes) .globl name
80 # ifdef LISP_FEATURE_PPC
81 # ifdef LISP_FEATURE_DARWIN
82 # define EXTERN(name,bytes) .globl _/**/name
84 # define EXTERN(name,bytes) .globl name
88 # if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)
89 # define EXTERN(name,bytes) .global name
92 # if defined(LISP_FEATURE_ALPHA) || defined(LISP_FEATURE_X86_64)
93 # define POINTERSIZE 8
95 # define POINTERSIZE 4
98 EXTERN(foreign_function_call_active, 4)
100 EXTERN(current_control_stack_pointer, POINTERSIZE)
101 EXTERN(current_control_frame_pointer, POINTERSIZE)
102 # if !defined(LISP_FEATURE_X86) && !defined(LISP_FEATURE_X86_64)
103 EXTERN(current_binding_stack_pointer, POINTERSIZE)
105 # ifndef LISP_FEATURE_GENCGC
106 EXTERN(dynamic_space_free_pointer, POINTERSIZE)
109 #endif /* LANGUAGE_ASSEMBLY */
111 #endif /* _INCLUDED_GLOBALS_H_ */