Clean up RCS ids
[projects/cmucl/cmucl.git] / src / lisp / Darwin-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 _DARWIN_OS_H_
9 #define _DARWIN_OS_H_
10
11 #include <sys/types.h>
12 #include <sys/mman.h>
13 #include <sys/signal.h>
14 #include <signal.h>
15 #include <sys/ucontext.h>
16 #include <mach/vm_types.h>
17
18 typedef caddr_t os_vm_address_t;
19 typedef vm_size_t os_vm_size_t;
20 typedef off_t os_vm_offset_t;
21 typedef int os_vm_prot_t;
22
23 #define OS_VM_PROT_READ PROT_READ
24 #define OS_VM_PROT_WRITE PROT_WRITE
25 #define OS_VM_PROT_EXECUTE PROT_EXEC
26
27 #define OS_VM_DEFAULT_PAGESIZE  4096
28
29 #define HANDLER_ARGS int signal, siginfo_t *code, void *context
30 #define CODE(code)  ((code) ? code->si_code : 0)
31 #define os_context_t ucontext_t
32 #ifdef __i386__
33 #define RESTORE_FPU(context) restore_fpu(context)
34 #endif
35
36 #ifdef __ppc__
37 unsigned int *sc_reg(os_context_t *, int);
38 #else
39 int *sc_reg(os_context_t *, int);
40 #endif
41 void restore_fpu(ucontext_t *);
42
43 #define PROTECTION_VIOLATION_SIGNAL SIGBUS
44
45 #endif /* _DARWIN_OS_H_ */