0.9.2.47:
[sbcl/lichteblau.git] / src / runtime / globals.h
blob71f30850e79a10356fd637e541cf0a2989956505
1 /*
2 * This software is part of the SBCL system. See the README file for
3 * more information.
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>
17 # include <unistd.h>
18 # include "runtime.h"
19 #endif
21 #include "sbcl.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;
29 #endif
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;
35 # endif
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;
41 # endif
43 extern lispobj *current_dynamic_space;
45 extern void globals_init(void);
47 #else /* LANGUAGE_ASSEMBLY */
49 # ifdef LISP_FEATURE_MIPS
50 # ifdef __linux__
51 # define EXTERN(name,bytes) .globl name
52 # else
53 # define EXTERN(name,bytes) .extern name bytes
54 # endif
55 # endif
56 /**/
57 # ifdef LISP_FEATURE_SPARC
58 # ifdef SVR4
59 # define EXTERN(name,bytes) .global name
60 # else
61 # define EXTERN(name,bytes) .global _ ## name
62 # endif
63 # endif
64 /**/
65 # ifdef LISP_FEATURE_ALPHA
66 # ifdef __linux__
67 # define EXTERN(name,bytes) .globl name
68 # endif
69 # endif
70 /**/
71 # ifdef LISP_FEATURE_PPC
72 # ifdef LISP_FEATURE_DARWIN
73 # define EXTERN(name,bytes) .globl _/**/name
74 # else
75 # define EXTERN(name,bytes) .globl name
76 # endif
77 # endif
78 /**/
79 # if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)
80 # define EXTERN(name,bytes) .global name
81 # endif
83 # if defined(LISP_FEATURE_ALPHA) || defined(LISP_FEATURE_X86_64)
84 # define POINTERSIZE 8
85 # else
86 # define POINTERSIZE 4
87 # endif
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)
95 # endif
96 # ifndef LISP_FEATURE_GENCGC
97 EXTERN(dynamic_space_free_pointer, POINTERSIZE)
98 # endif
100 #endif /* LANGUAGE_ASSEMBLY */
102 #endif /* _INCLUDED_GLOBALS_H_ */