source: release/1.5/source/lisp-kernel/lisp.h @ 13614

Last change on this file since 13614 was 13614, checked in by rme, 10 years ago

Merge r13595 from trunk.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/*
2   Copyright (C) 2009 Clozure Associates
3   Copyright (C) 1994-2001 Digitool, Inc
4   This file is part of Clozure CL. 
5
6   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
7   License , known as the LLGPL and distributed with Clozure CL as the
8   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
9   which is distributed with Clozure CL as the file "LGPL".  Where these
10   conflict, the preamble takes precedence. 
11
12   Clozure CL is referenced in the preamble as the "LIBRARY."
13
14   The LLGPL is also available online at
15   http://opensource.franz.com/preamble.html
16*/
17
18#ifndef __lisp__
19#define __lisp__
20
21
22
23#include "lisptypes.h"
24#ifndef LOWMEM_BIAS
25#define LOWMEM_BIAS 0
26#endif
27
28#ifdef PPC
29#include "ppc-constants.h"
30#endif
31#ifdef X86
32#include "x86-constants.h"
33#endif
34#include "macros.h"
35
36extern Boolean use_mach_exception_handling;
37
38extern int page_size, log2_page_size;
39
40static inline natural
41_align_to_power_of_2(natural n, unsigned power)
42{
43  natural align = (1<<power) -1;
44
45  return (n+align) & ~align;
46}
47
48#define align_to_power_of_2(n,p) _align_to_power_of_2(((natural)(n)),p)
49
50static inline natural
51_truncate_to_power_of_2(natural n, unsigned power)
52{
53  return n & ~((1<<power) -1);
54}
55
56#define truncate_to_power_of_2(n,p) _truncate_to_power_of_2((natural)(n),p)
57
58LispObj start_lisp(TCR*, LispObj);
59
60size_t
61ensure_stack_limit(size_t);
62
63char *
64print_lisp_object(LispObj);
65
66#include "kernel-globals.h"
67
68#define PLATFORM_WORD_SIZE_32 0
69#define PLATFORM_WORD_SIZE_64 64
70#define PLATFORM_CPU_PPC (0<<3)
71#define PLATFORM_CPU_SPARC (1<<3)
72#define PLATFORM_CPU_X86 (2<<3)
73#define PLATFORM_OS_VXWORKS 0
74#define PLATFORM_OS_LINUX 1
75#define PLATFORM_OS_SOLARIS 2
76#define PLATFORM_OS_DARWIN 3
77#define PLATFORM_OS_FREEBSD 4
78#define PLATFORM_OS_WINDOWS 5
79
80#ifdef LINUX
81#define PLATFORM_OS PLATFORM_OS_LINUX
82#endif
83
84#ifdef DARWIN
85#define PLATFORM_OS PLATFORM_OS_DARWIN
86#endif
87
88#ifdef FREEBSD
89#define PLATFORM_OS PLATFORM_OS_FREEBSD
90#endif
91
92#ifdef SOLARIS
93#define PLATFORM_OS PLATFORM_OS_SOLARIS
94#endif
95
96#ifdef WINDOWS
97#define PLATFORM_OS PLATFORM_OS_WINDOWS
98#endif
99
100#ifdef PPC
101#define PLATFORM_CPU PLATFORM_CPU_PPC
102#endif
103
104#ifdef X86
105#define PLATFORM_CPU PLATFORM_CPU_X86
106#endif
107
108#if (WORD_SIZE == 32)
109#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_32
110#endif
111
112#if (WORD_SIZE == 64)
113#define PLATFORM_WORD_SIZE PLATFORM_WORD_SIZE_64
114#endif
115
116#define PLATFORM (PLATFORM_OS|PLATFORM_CPU|PLATFORM_WORD_SIZE)
117
118#ifdef WINDOWS
119Boolean check_for_embedded_image (wchar_t *);
120#else
121Boolean check_for_embedded_image (char *);
122#endif
123natural xStackSpace();
124void init_threads(void *, TCR *);
125
126#ifdef WINDOWS
127void wperror(char *);
128#endif
129
130void ensure_static_conses(ExceptionInformation *, TCR *,natural);
131
132#include <stdio.h>
133
134extern FILE *dbgout;
135
136#endif /* __lisp__ */
Note: See TracBrowser for help on using the repository browser.