source: release/1.7/source/lisp-kernel/lisp.h @ 15267

Last change on this file since 15267 was 14880, checked in by rme, 8 years ago

Merge trunk changes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 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/* a platform-specific header file is pre-included via -include */
22
23#ifndef LOWMEM_BIAS
24#define LOWMEM_BIAS (0)
25#endif
26
27
28#include "macros.h"
29
30extern Boolean use_mach_exception_handling;
31
32extern int page_size, log2_page_size;
33
34static inline natural
35_align_to_power_of_2(natural n, unsigned power)
36{
37  natural align = (1<<power) -1;
38
39  return (n+align) & ~align;
40}
41
42#define align_to_power_of_2(n,p) _align_to_power_of_2(((natural)(n)),p)
43
44static inline natural
45_truncate_to_power_of_2(natural n, unsigned power)
46{
47  return n & ~((1<<power) -1);
48}
49
50#define truncate_to_power_of_2(n,p) _truncate_to_power_of_2((natural)(n),p)
51
52LispObj start_lisp(TCR*, LispObj);
53
54size_t
55ensure_stack_limit(size_t);
56
57char *
58print_lisp_object(LispObj);
59
60#include "kernel-globals.h"
61
62#define PLATFORM_WORD_SIZE_32 0
63#define PLATFORM_WORD_SIZE_64 64
64#define PLATFORM_CPU_PPC (0<<3)
65#define PLATFORM_CPU_SPARC (1<<3)
66#define PLATFORM_CPU_X86 (2<<3)
67#define PLATFORM_CPU_ARM (3<<3)
68#define PLATFORM_OS_VXWORKS 0
69#define PLATFORM_OS_LINUX 1
70#define PLATFORM_OS_SOLARIS 2
71#define PLATFORM_OS_DARWIN 3
72#define PLATFORM_OS_FREEBSD 4
73#define PLATFORM_OS_WINDOWS 5
74#define PLATFORM_OS_ANDROID 6
75
76
77
78#define PLATFORM (PLATFORM_OS|PLATFORM_CPU|PLATFORM_WORD_SIZE)
79
80#ifdef WINDOWS
81Boolean check_for_embedded_image (wchar_t *);
82#else
83Boolean check_for_embedded_image (char *);
84#endif
85natural xStackSpace();
86void init_threads(void *, TCR *);
87
88#ifdef WINDOWS
89void wperror(char *);
90#endif
91
92void ensure_static_conses(ExceptionInformation *, TCR *,natural);
93
94#include <stdio.h>
95
96extern FILE *dbgout;
97
98#define RESERVE_FOR_LISP 1
99#define ON_ALTSTACK 2
100#define RESTART_SYSCALLS 4
101
102void
103install_signal_handler(int signo, void *handler, unsigned flags);
104
105#endif /* __lisp__ */
Note: See TracBrowser for help on using the repository browser.