summaryrefslogtreecommitdiff
path: root/darwin_stop_world.c
diff options
context:
space:
mode:
Diffstat (limited to 'darwin_stop_world.c')
-rw-r--r--darwin_stop_world.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/darwin_stop_world.c b/darwin_stop_world.c
index cfe24655..d829f6a6 100644
--- a/darwin_stop_world.c
+++ b/darwin_stop_world.c
@@ -168,13 +168,19 @@ STATIC ptr_t GC_stack_range_for(ptr_t *phi, thread_act_t thread, GC_thread p,
arm_unified_thread_state_t unified_state;
mach_msg_type_number_t unified_thread_state_count
= ARM_UNIFIED_THREAD_STATE_COUNT;
-
- kern_result = thread_get_state(thread, ARM_UNIFIED_THREAD_STATE,
+# if defined(CPPCHECK)
+# define GC_ARM_UNIFIED_THREAD_STATE 1
+# else
+# define GC_ARM_UNIFIED_THREAD_STATE ARM_UNIFIED_THREAD_STATE
+# endif
+ kern_result = thread_get_state(thread, GC_ARM_UNIFIED_THREAD_STATE,
(natural_t *)&unified_state,
&unified_thread_state_count);
- if (unified_state.ash.flavor != ARM_THREAD_STATE32) {
- ABORT("unified_state flavor should be ARM_THREAD_STATE32");
- }
+# if !defined(CPPCHECK)
+ if (unified_state.ash.flavor != ARM_THREAD_STATE32) {
+ ABORT("unified_state flavor should be ARM_THREAD_STATE32");
+ }
+# endif
state = unified_state.ts_32;
} else
# endif