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.
13 #include <osreldate.h>
17 typedef void *os_vm_address_t;
18 typedef size_t os_vm_size_t;
19 typedef off_t os_vm_offset_t;
20 typedef int os_vm_prot_t;
21 #define os_context_t ucontext_t
23 #define OS_VM_PROT_READ PROT_READ
24 #define OS_VM_PROT_WRITE PROT_WRITE
25 #define OS_VM_PROT_EXECUTE PROT_EXEC
27 #define OS_VM_DEFAULT_PAGESIZE 4096
29 /* ucontext_t *context; using `void *' to compile without warning */
30 #define HANDLER_ARGS int signal, siginfo_t *code, void *context
32 #define CODE(code) ((code) ? code->si_code : 0)
33 #define RESTORE_FPU(context) restore_fpu(context)
35 void restore_fpu(ucontext_t *);
37 #if __FreeBSD_version < 700004
38 #define PROTECTION_VIOLATION_SIGNAL SIGBUS
39 #define PROTECTION_VIOLATION_CODE BUS_PAGE_FAULT
41 #define PROTECTION_VIOLATION_SIGNAL SIGSEGV
42 #define PROTECTION_VIOLATION_CODE SEGV_ACCERR
45 #endif /* _FREEBSD_OS_H_ */