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 # ifndef LISP_FEATURE_GENCGC
38 /* Beware! gencgc has also a (non-global) dynamic_space_free_pointer. */
39 extern lispobj
*dynamic_space_free_pointer
;
40 extern lispobj
*current_auto_gc_trigger
;
43 extern lispobj
*current_dynamic_space
;
45 extern void globals_init(void);
47 #else /* LANGUAGE_ASSEMBLY */
49 # ifdef LISP_FEATURE_MIPS
51 # define EXTERN(name,bytes) .globl name
53 # define EXTERN(name,bytes) .extern name bytes
57 # ifdef LISP_FEATURE_SPARC
59 # define EXTERN(name,bytes) .global name
61 # define EXTERN(name,bytes) .global _ ## name
65 # ifdef LISP_FEATURE_ALPHA
67 # define EXTERN(name,bytes) .globl name
71 # ifdef LISP_FEATURE_PPC
72 # ifdef LISP_FEATURE_DARWIN
73 # define EXTERN(name,bytes) .globl _/**/name
75 # define EXTERN(name,bytes) .globl name
79 # if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)
80 # define EXTERN(name,bytes) .global name
83 # if defined(LISP_FEATURE_ALPHA) || defined(LISP_FEATURE_X86_64)
84 # define POINTERSIZE 8
86 # define POINTERSIZE 4
89 EXTERN(foreign_function_call_active
, 4)
91 EXTERN(current_control_stack_pointer
, POINTERSIZE
)
92 EXTERN(current_control_frame_pointer
, POINTERSIZE
)
93 # if !defined(LISP_FEATURE_X86) && !defined(LISP_FEATURE_X86_64)
94 EXTERN(current_binding_stack_pointer
, POINTERSIZE
)
96 # ifndef LISP_FEATURE_GENCGC
97 EXTERN(dynamic_space_free_pointer
, POINTERSIZE
)
100 #endif /* LANGUAGE_ASSEMBLY */
102 #endif /* _INCLUDED_GLOBALS_H_ */