/[cmucl]/src/lisp/FreeBSD-os.h
ViewVC logotype

Contents of /src/lisp/FreeBSD-os.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.23 - (show annotations)
Tue Jan 20 04:45:18 2009 UTC (5 years, 2 months ago) by agoncharov
Branch: MAIN
CVS Tags: sparc-tramp-assem-base, post-merge-intl-branch, merged-unicode-utf16-extfmt-2009-06-11, intl-branch-working-2010-02-19-1000, unicode-string-buffer-impl-base, release-20b-pre1, release-20b-pre2, unicode-string-buffer-base, sparc-tramp-assem-2010-07-19, amd64-dd-start, release-19f-pre1, intl-2-branch-base, GIT-CONVERSION, cross-sol-x86-merged, label-2009-03-16, release-19f-base, merge-with-19f, intl-branch-working-2010-02-11-1000, RELEASE_20b, RELEASE_19f, release-20a-base, cross-sol-x86-base, snapshot-2010-12, snapshot-2010-11, snapshot-2011-09, snapshot-2011-06, snapshot-2011-07, snapshot-2011-04, snapshot-2011-02, snapshot-2011-03, snapshot-2011-01, pre-merge-intl-branch, snapshot-2010-05, snapshot-2010-04, snapshot-2010-07, snapshot-2010-06, snapshot-2010-01, snapshot-2010-03, snapshot-2010-02, snapshot-2010-08, label-2009-03-25, cross-sol-x86-2010-12-20, intl-branch-2010-03-18-1300, RELEASE_20a, release-20a-pre1, snapshot-2009-11, snapshot-2009-12, portable-clx-import-2009-06-16, cross-sparc-branch-base, intl-branch-base, portable-clx-base, snapshot-2009-08, snapshot-2009-02, snapshot-2009-07, snapshot-2009-05, snapshot-2009-04, HEAD
Branch point for: RELEASE-19F-BRANCH, portable-clx-branch, cross-sparc-branch, RELEASE-20B-BRANCH, unicode-string-buffer-branch, sparc-tramp-assem-branch, RELEASE-20A-BRANCH, amd64-dd-branch, unicode-string-buffer-impl-branch, intl-branch, cross-sol-x86-branch, intl-2-branch
Changes since 1.22: +4 -2 lines
File MIME type: text/plain
A more consistent treatment of signal handlers.
1 /*
2
3 $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/FreeBSD-os.h,v 1.23 2009/01/20 04:45:18 agoncharov Rel $
4
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.
7
8 */
9
10 #ifndef _FREEBSD_OS_H_
11 #define _FREEBSD_OS_H_
12
13 #include <sys/mman.h>
14
15 #include <osreldate.h>
16 #include <signal.h>
17 #include <ucontext.h>
18
19 typedef void *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 #define OS_VM_DEFAULT_PAGESIZE 4096
30
31 /* ucontext_t *context; using `void *' to compile without warning */
32 #define HANDLER_ARGS int signal, siginfo_t *code, void *context
33
34 #define CODE(code) ((code) ? code->si_code : 0)
35 #define RESTORE_FPU(context) restore_fpu(context)
36
37 void restore_fpu(ucontext_t *);
38
39 #if __FreeBSD_version < 700004
40 #define PROTECTION_VIOLATION_SIGNAL SIGBUS
41 #define PROTECTION_VIOLATION_CODE BUS_PAGE_FAULT
42 #else
43 #define PROTECTION_VIOLATION_SIGNAL SIGSEGV
44 #define PROTECTION_VIOLATION_CODE SEGV_ACCERR
45 #endif
46
47 #endif /* _FREEBSD_OS_H_ */

  ViewVC Help
Powered by ViewVC 1.1.5