| 195461c1 |
1 | /* |
| 2 | |
| 195461c1 |
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 _OPENBSD_OS_H_ |
| 9 | #define _OPENBSD_OS_H_ |
| 10 | |
| 11 | |
| 195461c1 |
12 | #include <sys/types.h> |
| 13 | #include <sys/mman.h> |
| 14 | #include <sys/signal.h> |
| 15 | |
| 195461c1 |
16 | typedef caddr_t os_vm_address_t; |
| 17 | typedef vm_size_t os_vm_size_t; |
| 18 | typedef off_t os_vm_offset_t; |
| 19 | typedef int os_vm_prot_t; |
| 20 | |
| 21 | #define OS_VM_PROT_READ PROT_READ |
| 22 | #define OS_VM_PROT_WRITE PROT_WRITE |
| 23 | #define OS_VM_PROT_EXECUTE PROT_EXEC |
| 24 | |
| 25 | #define OS_VM_DEFAULT_PAGESIZE 4096 |
| 26 | |
| 195461c1 |
27 | #define HANDLER_ARGS int signal, siginfo_t *code, struct sigcontext *context |
| 28 | #define CODE(code) ((code) ? code->si_code : 0) |
| 29 | |
| 30 | #define uc_sigmask sc_mask |
| 3e4590e7 |
31 | int *sc_reg(struct sigcontext *, int); |
| e67c0397 |
32 | |
| 33 | #endif /* _OPENBSD_OS_H_ */ |