3e8feca7931c841c166f33fe215395ae9f152a4c
[sbcl.git] / src / runtime / globals.h
1 /*
2  * This software is part of the SBCL system. See the README file for
3  * more information.
4  *
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.
10  */
11
12 /*
13  * $Header$
14  */
15
16 #if !defined(_INCLUDE_GLOBALS_H_)
17 #define _INCLUDED_GLOBALS_H_
18
19 #ifndef LANGUAGE_ASSEMBLY
20
21 #include "runtime.h"
22
23 extern int foreign_function_call_active;
24
25 extern lispobj *current_control_stack_pointer;
26 extern lispobj *current_control_frame_pointer;
27 #if !defined(ibmrt) && !defined(__i386__)
28 extern lispobj *current_binding_stack_pointer;
29 #endif
30
31 extern lispobj *read_only_space;
32 extern lispobj *static_space;
33 extern lispobj *control_stack;
34 extern lispobj *binding_stack;
35 #ifdef __i386__
36 extern lispobj *control_stack_end;
37 #endif
38 #if !defined(ibmrt) && !defined(__i386__)
39 extern lispobj *dynamic_space_free_pointer;
40 extern lispobj *current_auto_gc_trigger;
41 #endif
42
43 extern void globals_init(void);
44
45 #else  LANGUAGE_ASSEMBLY
46
47 /* These are needed by ./assem.s */
48
49 #ifdef mips
50 #define EXTERN(name,bytes) .extern name bytes
51 #endif
52 #ifdef sparc
53 #ifdef SVR4
54 #define EXTERN(name,bytes) .global name
55 #else
56 #define EXTERN(name,bytes) .global _ ## name
57 #endif
58 #endif
59 #ifdef ibmrt
60 #define EXTERN(name,bytes) .globl _/**/name
61 #endif
62
63 #ifdef __i386__
64 #ifdef __linux__
65 #define EXTERN(name,bytes) .globl _/**/name
66 #else
67 #define EXTERN(name,bytes) .global _ ## name
68 #endif
69 #endif
70
71 EXTERN(foreign_function_call_active, 4)
72
73 EXTERN(current_control_stack_pointer, 4)
74 EXTERN(current_control_frame_pointer, 4)
75 #if !defined(ibmrt) && !defined(__i386__)
76 EXTERN(current_binding_stack_pointer, 4)
77 EXTERN(dynamic_space_free_pointer, 4)
78 #endif
79
80 #ifdef mips
81 EXTERN(current_flags_register, 4)
82 #endif
83
84 #endif LANGUAGE_ASSEMBLY
85
86 #endif _INCLUDED_GLOBALS_H_