Integrate cctools-809 changes
[striptease.git] / include / mach / arm / thread_status.h
blobaae2cb2647c6f33325f9d125577324258e97addd
1 /*
2 * Copyright (c) 2007 Apple Inc. All rights reserved.
3 */
4 /*
5 * FILE_ID: thread_status.h
6 */
9 #ifndef _ARM_THREAD_STATUS_H_
10 #define _ARM_THREAD_STATUS_H_
12 #include <mach/arm/_structs.h>
13 #include <mach/message.h>
14 #include <mach/arm/thread_state.h>
17 * Support for determining the state of a thread
22 * Flavors
25 #define ARM_THREAD_STATE 1
26 #define ARM_VFP_STATE 2
27 #define ARM_EXCEPTION_STATE 3
28 #define ARM_DEBUG_STATE 4
29 #define THREAD_STATE_NONE 5
31 #define VALID_THREAD_STATE_FLAVOR(x)\
32 ((x == ARM_THREAD_STATE) || \
33 (x == ARM_VFP_STATE) || \
34 (x == ARM_EXCEPTION_STATE) || \
35 (x == ARM_DEBUG_STATE) || \
36 (x == THREAD_STATE_NONE))
38 typedef _STRUCT_ARM_THREAD_STATE arm_thread_state_t;
39 typedef _STRUCT_ARM_VFP_STATE arm_vfp_state_t;
40 typedef _STRUCT_ARM_EXCEPTION_STATE arm_exception_state_t;
41 typedef _STRUCT_ARM_DEBUG_STATE arm_debug_state_t;
43 #define ARM_THREAD_STATE_COUNT ((mach_msg_type_number_t) \
44 (sizeof (arm_thread_state_t)/sizeof(uint32_t)))
46 #define ARM_VFP_STATE_COUNT ((mach_msg_type_number_t) \
47 (sizeof (arm_vfp_state_t)/sizeof(uint32_t)))
49 #define ARM_EXCEPTION_STATE_COUNT ((mach_msg_type_number_t) \
50 (sizeof (arm_exception_state_t)/sizeof(uint32_t)))
52 #define ARM_DEBUG_STATE_COUNT ((mach_msg_type_number_t) \
53 (sizeof (arm_debug_state_t)/sizeof(uint32_t)))
56 * Largest state on this machine:
58 #define THREAD_MACHINE_STATE_MAX THREAD_STATE_MAX
61 #endif /* _ARM_THREAD_STATUS_H_ */