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 #ifdef LISP_FEATURE_WIN32
28 #define ENVIRON _environ
30 #define ENVIRON environ
32 extern char **ENVIRON;
34 #if defined(LISP_FEATURE_SB_THREAD)
35 extern pthread_key_t specials;
38 extern lispobj *current_control_stack_pointer;
39 extern lispobj *current_control_frame_pointer;
40 # if !defined(LISP_FEATURE_X86) && !defined(LISP_FEATURE_X86_64)
41 extern lispobj *current_binding_stack_pointer;
44 #if !defined(LISP_FEATURE_X86) && !defined(LISP_FEATURE_X86_64)
45 /* This is unused on X86 and X86_64, but is used as the global
46 * allocation pointer by the cheney GC, and, in some instances, as
47 * the global allocation pointer on PPC/GENCGC. This should probably
48 * be cleaned up such that it only needs to exist on cheney. At the
49 * moment, it is also used by the GENCGC, to hold the pseudo_atomic
50 * bits, and is tightly coupled to reg_ALLOC by the assembly
52 extern lispobj *dynamic_space_free_pointer;
55 # ifndef LISP_FEATURE_GENCGC
56 extern lispobj *current_auto_gc_trigger;
59 extern lispobj *current_dynamic_space;
61 extern void globals_init(void);
63 #else /* LANGUAGE_ASSEMBLY */
65 # ifdef LISP_FEATURE_MIPS
67 # define EXTERN(name,bytes) .globl name
69 # define EXTERN(name,bytes) .extern name bytes
73 # ifdef LISP_FEATURE_SPARC
75 # define EXTERN(name,bytes) .global name
77 # define EXTERN(name,bytes) .global _ ## name
81 # ifdef LISP_FEATURE_ALPHA
83 # define EXTERN(name,bytes) .globl name
87 # ifdef LISP_FEATURE_PPC
88 # ifdef LISP_FEATURE_DARWIN
89 # define EXTERN(name,bytes) .globl _/**/name
91 # define EXTERN(name,bytes) .globl name
95 # if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)
96 # define EXTERN(name,bytes) .global name
99 # if defined(LISP_FEATURE_ALPHA) || defined(LISP_FEATURE_X86_64)
100 # define POINTERSIZE 8
102 # define POINTERSIZE 4
105 EXTERN(foreign_function_call_active, 4)
107 EXTERN(current_control_stack_pointer, POINTERSIZE)
108 EXTERN(current_control_frame_pointer, POINTERSIZE)
109 # if !defined(LISP_FEATURE_X86) && !defined(LISP_FEATURE_X86_64)
110 EXTERN(current_binding_stack_pointer, POINTERSIZE)
112 # ifndef LISP_FEATURE_GENCGC
113 EXTERN(dynamic_space_free_pointer, POINTERSIZE)
116 #endif /* LANGUAGE_ASSEMBLY */
118 #endif /* _INCLUDED_GLOBALS_H_ */