/[cmucl]/src/lisp/sunos-os.h
ViewVC logotype

Contents of /src/lisp/sunos-os.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations)
Wed Dec 22 02:12:52 2010 UTC (3 years, 3 months ago) by rtoy
Branch: MAIN
CVS Tags: GIT-CONVERSION, cross-sol-x86-merged, snapshot-2011-09, snapshot-2011-06, snapshot-2011-07, snapshot-2011-04, snapshot-2011-02, snapshot-2011-03, snapshot-2011-01, HEAD
Changes since 1.13: +7 -1 lines
File MIME type: text/plain
Merge changes from cross-sol-x86-2010-12-20 which adds support for
Solaris/x86.  There should be no functional changes for either other
x86 ports or for the sparc port.
1 /*
2
3 $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/sunos-os.h,v 1.14 2010/12/22 02:12:52 rtoy Exp $
4
5 This code was written as part of the CMU Common Lisp project at
6 Carnegie Mellon University, and has been placed in the public domain.
7
8 */
9
10 #ifndef _SUNOS_OS_H_
11 #define _SUNOS_OS_H_
12
13 #ifdef SOLARIS
14 #undef boolean
15 #endif /* SOLARIS */
16
17 #include <sys/param.h>
18 #include <sys/types.h>
19 #include <string.h>
20
21 #ifdef SOLARIS
22 #define boolean int
23 #include <signal.h>
24 #include <unistd.h>
25 #include <sys/fcntl.h>
26 #endif /* SOLARIS */
27
28 #include <sys/mman.h>
29
30 #ifdef SOLARIS
31 #include <ucontext.h>
32 #define sigcontext ucontext
33
34 #endif /* SOLARIS */
35
36 typedef unsigned long os_vm_address_t;
37 typedef long os_vm_size_t;
38 typedef off_t os_vm_offset_t;
39 typedef int os_vm_prot_t;
40
41 #define OS_VM_PROT_READ PROT_READ
42 #define OS_VM_PROT_WRITE PROT_WRITE
43 #define OS_VM_PROT_EXECUTE PROT_EXEC
44
45 #ifdef i386
46 #define OS_VM_DEFAULT_PAGESIZE 4096
47 #else
48 #define OS_VM_DEFAULT_PAGESIZE 8192
49 #endif
50
51 #ifdef SOLARIS
52 #include <ucontext.h>
53 #define HANDLER_ARGS int signal, siginfo_t *code, struct ucontext *context
54 #define CODE(code) ((code) ? code->si_code : 0)
55 #ifndef i386
56 #define SAVE_CONTEXT() save_context()
57 #endif
58
59 #ifdef NULL
60 #undef NULL
61 #define NULL 0
62 #endif
63
64 extern void flush_icache(unsigned int *, unsigned int);
65 extern void save_context(void);
66
67 #endif /* SOLARIS */
68
69 #define PROTECTION_VIOLATION_SIGNAL SIGSEGV
70
71 #endif /* _SUNOS_OS_H_ */

  ViewVC Help
Powered by ViewVC 1.1.5