1.0.10.37: fix x86-64/darwin build
[sbcl.git] / src / runtime / darwin-os.h
1 #ifndef _DARWIN_OS_H
2 #define _DARWIN_OS_H
3
4 /* this is meant to be included from bsd-os.h */
5
6 #include <mach/mach_init.h>
7 #include <mach/task.h>
8 #include <AvailabilityMacros.h>
9
10 /* man pages claim that the third argument is a sigcontext struct,
11    but ucontext_t is defined, matches sigcontext where sensible,
12    offers better access to mcontext, and is of course the SUSv2-
13    mandated type of the third argument, so we use that instead.
14    If Apple is going to break ucontext_t out of spite, I'm going
15    to be cross with them ;) -- PRM */
16
17 #if defined(LISP_FEATURE_X86)
18 #include <sys/ucontext.h>
19 #include <sys/_types.h>
20 #ifdef MAC_OS_X_VERSION_10_5
21 typedef struct __darwin_ucontext os_context_t;
22 #else
23 typedef struct ucontext os_context_t;
24 #endif
25
26
27 #else
28 #include <ucontext.h>
29 typedef ucontext_t os_context_t;
30 #endif
31
32 #define SIG_MEMORY_FAULT SIGBUS
33
34 #define SIG_INTERRUPT_THREAD (SIGINFO)
35 #define SIG_STOP_FOR_GC (SIGUSR1)
36 #define SIG_RESUME_FROM_GC (SIGUSR2)
37
38 #endif /* _DARWIN_OS_H */