Clean up RCS ids
[projects/cmucl/cmucl.git] / src / lisp / sunos-os.h
CommitLineData
82a2bc67 1/*
2
82a2bc67 3 This code was written as part of the CMU Common Lisp project at
4 Carnegie Mellon University, and has been placed in the public domain.
5
6*/
7
e67c0397 8#ifndef _SUNOS_OS_H_
9#define _SUNOS_OS_H_
10
3861a7bf 11#ifdef SOLARIS
12#undef boolean
13#endif /* SOLARIS */
14
1c58559d 15#include <sys/param.h>
36232b68 16#include <sys/types.h>
e67c0397 17#include <string.h>
3861a7bf 18
19#ifdef SOLARIS
20#define boolean int
21#include <signal.h>
22#include <unistd.h>
23#include <sys/fcntl.h>
24#endif /* SOLARIS */
25
36232b68 26#include <sys/mman.h>
27
3861a7bf 28#ifdef SOLARIS
29#include <ucontext.h>
30#define sigcontext ucontext
31
3861a7bf 32#endif /* SOLARIS */
33
36232b68 34typedef unsigned long os_vm_address_t;
35typedef long os_vm_size_t;
36typedef off_t os_vm_offset_t;
37typedef int os_vm_prot_t;
38
39#define OS_VM_PROT_READ PROT_READ
40#define OS_VM_PROT_WRITE PROT_WRITE
41#define OS_VM_PROT_EXECUTE PROT_EXEC
42
6438e048 43#ifdef i386
44#define OS_VM_DEFAULT_PAGESIZE 4096
45#else
36232b68 46#define OS_VM_DEFAULT_PAGESIZE 8192
6438e048 47#endif
3861a7bf 48
49#ifdef SOLARIS
50#include <ucontext.h>
cba6f60b 51#define HANDLER_ARGS int signal, siginfo_t *code, void *context
3861a7bf 52#define CODE(code) ((code) ? code->si_code : 0)
cba6f60b
RT
53typedef struct ucontext os_context_t__;
54#define os_context_t os_context_t__
6438e048 55#ifndef i386
3861a7bf 56#define SAVE_CONTEXT() save_context()
6438e048 57#endif
3861a7bf 58
59#ifdef NULL
60#undef NULL
61#define NULL 0
62#endif
63
9a8c1c2f 64extern void flush_icache(unsigned int *, unsigned int);
015a25b6 65extern void save_context(void);
66
3861a7bf 67#endif /* SOLARIS */
72f0aa1e 68
69#define PROTECTION_VIOLATION_SIGNAL SIGSEGV
e67c0397 70
71#endif /* _SUNOS_OS_H_ */