Clean up RCS ids
[projects/cmucl/cmucl.git] / src / lisp / NetBSD-os.h
1 /*
2
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
8 #ifndef _NETBSD_OS_H_
9 #define _NETBSD_OS_H_
10
11 #include <sys/param.h>
12 #include <sys/types.h>
13 #include <sys/mman.h>
14 #include <sys/signal.h>
15 #include <ucontext.h>
16 #include <string.h>
17 #include <unistd.h>
18
19 typedef caddr_t os_vm_address_t;
20 typedef size_t os_vm_size_t;
21 typedef off_t os_vm_offset_t;
22 typedef int os_vm_prot_t;
23 #define os_context_t ucontext_t
24
25 #define OS_VM_PROT_READ PROT_READ
26 #define OS_VM_PROT_WRITE PROT_WRITE
27 #define OS_VM_PROT_EXECUTE PROT_EXEC
28
29 #if defined(sparc)
30 #define OS_VM_DEFAULT_PAGESIZE  8192
31 #else
32 #define OS_VM_DEFAULT_PAGESIZE  4096
33 #endif
34
35 #define HANDLER_ARGS int signal, siginfo_t *code, ucontext_t *context
36 #define CODE(code)  ((code) ? code->si_code : 0)
37 #define RESTORE_FPU(context) restore_fpu(context)
38
39 void restore_fpu(ucontext_t *);
40
41 #define PROTECTION_VIOLATION_SIGNAL SIGSEGV
42
43 #endif /* _NETBSD_OS_H_ */