]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/arm/status_shared.c
xnu-7195.60.75.tar.gz
[apple/xnu.git] / osfmk / arm / status_shared.c
index 42d7a1235e9dc57a1b85fdd3ab271cb39b38b227..5af3ff8e64ecb3efbf46b8326879204bfde0ec79 100644 (file)
@@ -30,7 +30,6 @@
 #include <mach/kern_return.h>
 #include <mach/thread_status.h>
 #include <kern/thread.h>
-#include <kern/kalloc.h>
 #include <arm/vmparam.h>
 #include <arm/cpu_data_internal.h>
 
@@ -48,8 +47,9 @@ saved_state_to_thread_state32(const arm_saved_state_t *saved_state, arm_thread_s
        ts32->sp = (uint32_t)get_saved_state_sp(saved_state);
        ts32->pc = (uint32_t)get_saved_state_pc(saved_state);
        ts32->cpsr = get_saved_state_cpsr(saved_state);
-       for (i = 0; i < 13; i++)
+       for (i = 0; i < 13; i++) {
                ts32->r[i] = (uint32_t)get_saved_state_reg(saved_state, i);
+       }
 }
 
 /*
@@ -70,12 +70,11 @@ thread_state32_to_saved_state(const arm_thread_state32_t *ts32, arm_saved_state_
        set_saved_state_cpsr(saved_state, (ts32->cpsr & ~PSR64_MODE_MASK) | PSR64_MODE_RW_32);
 #elif defined(__arm__)
        set_saved_state_cpsr(saved_state, (ts32->cpsr & ~PSR_USER_MASK) | (ts32->cpsr & PSR_USER_MASK));
-#else 
+#else
 #error Unknown architecture.
 #endif
 
-       for (i = 0; i < 13; i++)
+       for (i = 0; i < 13; i++) {
                set_saved_state_reg(saved_state, i, ts32->r[i]);
+       }
 }
-
-