3 $Header: /project/cmucl/cvsroot/src/lisp/Darwin-os.h,v 1.7 2008-01-03 11:41:54 cshapiro Exp $
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.
13 #include <sys/types.h>
15 #include <sys/signal.h>
17 #include <sys/ucontext.h>
18 #include <mach/vm_types.h>
20 typedef caddr_t os_vm_address_t;
21 typedef vm_size_t os_vm_size_t;
22 typedef off_t os_vm_offset_t;
23 typedef int os_vm_prot_t;
25 #define OS_VM_PROT_READ PROT_READ
26 #define OS_VM_PROT_WRITE PROT_WRITE
27 #define OS_VM_PROT_EXECUTE PROT_EXEC
29 #define OS_VM_DEFAULT_PAGESIZE 4096
31 #define HANDLER_ARGS int signal, siginfo_t *code, void *context
32 #define CODE(code) ((code) ? code->si_code : 0)
33 #define os_context_t ucontext_t
35 #define RESTORE_FPU(context) restore_fpu(context)
39 unsigned int *sc_reg(os_context_t *, int);
41 int *sc_reg(os_context_t *, int);
43 void restore_fpu(ucontext_t *);
45 #define PROTECTION_VIOLATION_SIGNAL SIGBUS
47 #endif /* _DARWIN_OS_H_ */