1.0.19.33: Improved interrupt handling on darwin/x86[-64]
[sbcl/eslaughter.git] / src / runtime / darwin-os.h
blob2a7a405dbba0cb452e29df58f03d2dacada89db8
1 #ifndef _DARWIN_OS_H
2 #define _DARWIN_OS_H
4 /* this is meant to be included from bsd-os.h */
6 #include <mach/mach_init.h>
7 #include <mach/task.h>
8 #include <AvailabilityMacros.h>
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 */
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
27 #else
28 #include <ucontext.h>
29 typedef ucontext_t os_context_t;
30 #endif
32 #define SIG_MEMORY_FAULT SIGBUS
34 #define SIG_INTERRUPT_THREAD (SIGINFO)
35 #define SIG_STOP_FOR_GC (SIGUSR1)
36 #define SIG_RESUME_FROM_GC (SIGUSR2)
38 #endif /* _DARWIN_OS_H */