source: trunk/ccl/lisp-kernel/lisp.h @ 6

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

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 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__
18#define __lisp__
19
20#include "lisptypes.h"
21
22#include "constants.h"
23#include "macros.h"
24
25
26
27static inline unsigned long
28_align_to_power_of_2(unsigned long n, unsigned power)
29{
30  unsigned align = (1<<power) -1;
31
32  return (n+align) & ~align;
33}
34
35#define align_to_power_of_2(n,p) _align_to_power_of_2(((unsigned long)(n)),p)
36
37static inline unsigned long
38_truncate_to_power_of_2(unsigned long n, unsigned power)
39{
40  return n & ~((1<<power) -1);
41}
42
43#define truncate_to_power_of_2(n,p) _truncate_to_power_of_2((unsigned long)(n),p)
44
45LispObj start_lisp(TCR*, LispObj);
46
47#include "kernel-globals.h"
48#endif
Note: See TracBrowser for help on using the repository browser.