source: trunk/ccl/lisp-kernel/lisp_globals.h @ 217

Last change on this file since 217 was 217, checked in by gb, 16 years ago

STATICALLY_LINKED global.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.2 KB
Line 
1/*
2   Copyright (C) 1994-2001 Digitool, Inc
3   This file is part of OpenMCL. 
4
5   OpenMCL is licensed under the terms of the Lisp Lesser GNU Public
6   License , known as the LLGPL and distributed with OpenMCL as the
7   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
8   which is distributed with OpenMCL as the file "LGPL".  Where these
9   conflict, the preamble takes precedence. 
10
11   OpenMCL is referenced in the preamble as the "LIBRARY."
12
13   The LLGPL is also available online at
14   http://opensource.franz.com/preamble.html
15*/
16
17#ifndef __lisp_globals__
18#define __lisp_globals__
19
20
21extern LispObj lisp_nil;
22
23#define GET_TCR (-1)            /* address of get_tcr() for callbacks */
24#define TCR_COUNT (-2)          /* next tcr's tcr_id */
25#define INTERRUPT_SIGNAL  (-3)  /* signal to use for PROCESS-INTERRUPT */
26#define KERNEL_IMPORTS (-4)     /* some things we need to have imported for us. */
27#define TCR_LOCK (-5)           /* lock on the TCR queue */
28#define EMULATOR_REGISTERS (-6) /* Where the 68K registers are kept. */
29#define APPMAIN (-7)            /* application's (c-runtime) main() function */
30#define SUBPRIMS_BASE (-8)      /* where the dynamic subprims wound up */
31#define RET1VALN (-9)           /* magic multiple-values return address */
32#define TCR_KEY (-10)           /* tsd key for per-thread tcr */
33#define bad_GC_LOCK (-11)       /* rwlock for GC */
34#define EXCEPTION_LOCK (-12)    /* serialize exception handling */
35#define GO_TAG_COUNTER (-13)
36#define BLOCK_TAG_COUNTER (-14)
37#define INTFLAG (-15)
38#define GC_INHIBIT_COUNT (-16)
39#define OS_TRAP_CALL (-17)
40#define TB_TRAP_CALL (-18)
41#define ALTIVEC_PRESENT (-19)   /* non-zero if AltiVec present. */
42#define FWDNUM (-20)            /* fixnum: GC "forwarder" call count. */
43#define GC_NUM (-21)            /* fixnum: GC call count. */
44#define GCABLE_POINTERS (-22)   /* linked-list of weak macptrs. */
45#define HEAP_START (-23)        /* start of lisp heap */
46#define HEAP_END (-24)          /* end of lisp heap */
47#define STATICALLY_LINKED (-25)        /* non-zero if -static */
48#define BAD_CURRENT_VS (-26)        /* area describing value-stack */
49#define BAD_CURRENT_TS (-27)        /* area describing temp-stack */
50#define BAD_CS_OVERFLOW_LIMIT (-28) /* value for control-stack overflow check */
51#define ALL_AREAS (-29)         /* doubly-linked list of stack & heap areas */
52#define LEXPR_RETURN (-30)      /* magic &lexpr cleanup code */
53#define LEXPR_RETURN1V (-31)    /* single-value &lexpr cleanup code */
54#define IN_GC (-32)             /* non-zero when lisp addresses may be invalid */
55#define METERING_INFO (-33)     /* address of lisp_metering global */
56#define DOH_HEAD (-34)          /* Homer ? */
57#define SHORT_FLOAT_ZERO (-35)  /* low half of 1.0d0 */
58#define DOUBLE_FLOAT_ONE (-36)  /* high half of 1.0d0 */
59#define LISP_RETURN_HOOK (-37)  /* install lisp exception handling */
60#define LISP_EXIT_HOOK (-38)    /* install foreign exception handling */
61#define OLDEST_EPHEMERAL (-39)  /* doubleword address of oldest ephemeral object or 0 */
62#define TENURED_AREA (-40)      /* the tenured area */
63#define ERRNO (-41)             /* address of errno */
64#define ARGV (-42)              /* pointer to &argv[0] */
65#define HOST_PLATFORM (-43)     /* for platform-specific initialization */
66#define BATCH_FLAG (-44)        /* -b arg */
67#define BAD_FPSCR_SAVE (-45)    /* saved FPSCR for FFI */
68#define BAD_FPSCR_SAVE_HIGH (-46)       /* high word of FP reg used to save FPSCR */
69#define IMAGE_NAME (-47)        /* --image-name arg */
70#define INITIAL_TCR (-48)       /* initial thread tcr */
71#define READONLY_SECTION_END (-1020)
72#define READONLY_SECTION_START (-1021)
73#define STATIC_HEAP_NEXT (-1022) /* next static heap triplet in application or NULL */
74#define STATIC_HEAP_END (-1023) /* end of (primary) static heap */
75#define STATIC_HEAP_START (-1024) /* start of (primary) static heap */
76#define SUBPRIMS_TARGET_0 (-512) /* absolute address of subprim 0 jump target */
77#define SUBPRIMS_TARGET_N (-257) /* absolute address of subprim 255 jump target */
78
79
80#define lisp_global(g) (((LispObj *) (nil_value-fulltag_nil))[(g)])
81#define nrs_symbol(s) (((lispsymbol *) (nil_value+(8-fulltag_nil)+8))[(s)])
82
83#define nrs_T                           (nrs_symbol(0))         /* t */
84#define nrs_NILSYM                      (nrs_symbol(1))         /* nil */
85#define nrs_ERRDISP                     (nrs_symbol(2))         /* %err-disp */
86#define nrs_CMAIN                       (nrs_symbol(3))         /* cmain */
87#define nrs_EVAL                        (nrs_symbol(4))         /* eval */
88#define nrs_APPEVALFN                   (nrs_symbol(5))         /* apply-evaluated-function */
89#define nrs_ERROR                       (nrs_symbol(6))         /* error */
90#define nrs_DEFUN                       (nrs_symbol(7))         /* %defun */
91#define nrs_DEFVAR                      (nrs_symbol(8))         /* %defvar */
92#define nrs_DEFCONSTANT                 (nrs_symbol(9))         /* %defconstant */
93#define nrs_MACRO                       (nrs_symbol(10))        /* %macro */
94#define nrs_KERNELRESTART               (nrs_symbol(11))        /* %kernel-restart */
95#define nrs_PACKAGE                     (nrs_symbol(12))        /* *package* */
96#define nrs_TOTAL_BYTES_FREED           (nrs_symbol(13))        /* *total-bytes-freed* */
97#define nrs_KALLOWOTHERKEYS             (nrs_symbol(14))        /* :allow-other-keys */
98#define nrs_TOPLCATCH                   (nrs_symbol(15))        /* %toplevel-catch% */
99#define nrs_TOPLFUNC                    (nrs_symbol(16))        /* %toplevel-function% */
100#define nrs_CALLBACKS                   (nrs_symbol(17))        /* %pascal-functions% */
101#define nrs_ALLMETEREDFUNS              (nrs_symbol(18))        /* *all-metered-functions* */
102#define nrs_TOTAL_GC_MICROSECONDS       (nrs_symbol(19))        /* *total-gc-microseconds* */
103#define nrs_BUILTIN_FUNCTIONS           (nrs_symbol(20))        /* %builtin-functions% */
104#define nrs_UDF                         (nrs_symbol(21))        /* %unbound-function% */
105#define nrs_INIT_MISC                   (nrs_symbol(22))        /* %init-misc% */
106#define nrs_MACRO_CODE                  (nrs_symbol(23))        /* %macro-code% */
107#define nrs_CLOSURE_CODE                (nrs_symbol(24))        /* %closure-code% */
108#define nrs_NEW_GCABLE_PTR              (nrs_symbol(25))        /* %new-gcable-ptr */
109#define nrs_GC_EVENT_STATUS_BITS        (nrs_symbol(26))        /* *gc-event-status-bits* */
110#define nrs_POST_GC_HOOK                (nrs_symbol(27))        /* *post-gc-hook* */
111#define nrs_HANDLERS                    (nrs_symbol(28))        /* %handlers% */
112#define nrs_ALL_PACKAGES                (nrs_symbol(29))        /* %all-packages% */
113#define nrs_KEYWORD_PACKAGE             (nrs_symbol(30))        /* *keyword-package* */
114#define nrs_FINALIZATION_ALIST          (nrs_symbol(31))        /* %finalization-alist% */
115#define nrs_FOREIGN_THREAD_CONTROL      (nrs_symbol(32))        /* %foreign-thread-control */
116#define num_nilreg_symbols 33
117#define nilreg_symbols_end ((BytePtr) &(nrs_symbol(num_nilreg_symbols)))
118#endif
Note: See TracBrowser for help on using the repository browser.