OVR_mach_exc_OSX.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. #ifndef _mach_exc_user_
  2. #define _mach_exc_user_
  3. /* Module mach_exc */
  4. #include <string.h>
  5. #include <mach/ndr.h>
  6. #include <mach/boolean.h>
  7. #include <mach/kern_return.h>
  8. #include <mach/notify.h>
  9. #include <mach/mach_types.h>
  10. #include <mach/message.h>
  11. #include <mach/mig_errors.h>
  12. #include <mach/port.h>
  13. #ifdef AUTOTEST
  14. #ifndef FUNCTION_PTR_T
  15. #define FUNCTION_PTR_T
  16. typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
  17. typedef struct {
  18. char *name;
  19. function_ptr_t function;
  20. } function_table_entry;
  21. typedef function_table_entry *function_table_t;
  22. #endif /* FUNCTION_PTR_T */
  23. #endif /* AUTOTEST */
  24. #ifndef mach_exc_MSG_COUNT
  25. #define mach_exc_MSG_COUNT 3
  26. #endif /* mach_exc_MSG_COUNT */
  27. #include <mach/std_types.h>
  28. #include <mach/mig.h>
  29. #include <mach/mig.h>
  30. #include <mach/mach_types.h>
  31. #ifdef __BeforeMigUserHeader
  32. __BeforeMigUserHeader
  33. #endif /* __BeforeMigUserHeader */
  34. #include <sys/cdefs.h>
  35. __BEGIN_DECLS
  36. #if defined(__cplusplus)
  37. extern "C" {
  38. #endif
  39. /* Routine mach_exception_raise_OVR */
  40. #ifdef mig_external
  41. mig_external
  42. #else
  43. extern
  44. #endif /* mig_external */
  45. kern_return_t mach_exception_raise_OVR
  46. (
  47. mach_port_t exception_port,
  48. mach_port_t thread,
  49. mach_port_t task,
  50. exception_type_t exception,
  51. mach_exception_data_t code,
  52. mach_msg_type_number_t codeCnt
  53. );
  54. /* Routine mach_exception_raise_state_OVR */
  55. #ifdef mig_external
  56. mig_external
  57. #else
  58. extern
  59. #endif /* mig_external */
  60. kern_return_t mach_exception_raise_state_OVR
  61. (
  62. mach_port_t exception_port,
  63. exception_type_t exception,
  64. const mach_exception_data_t code,
  65. mach_msg_type_number_t codeCnt,
  66. int *flavor,
  67. const thread_state_t old_state,
  68. mach_msg_type_number_t old_stateCnt,
  69. thread_state_t new_state,
  70. mach_msg_type_number_t *new_stateCnt
  71. );
  72. /* Routine mach_exception_raise_state_identity_OVR */
  73. #ifdef mig_external
  74. mig_external
  75. #else
  76. extern
  77. #endif /* mig_external */
  78. kern_return_t mach_exception_raise_state_identity_OVR
  79. (
  80. mach_port_t exception_port,
  81. mach_port_t thread,
  82. mach_port_t task,
  83. exception_type_t exception,
  84. mach_exception_data_t code,
  85. mach_msg_type_number_t codeCnt,
  86. int *flavor,
  87. thread_state_t old_state,
  88. mach_msg_type_number_t old_stateCnt,
  89. thread_state_t new_state,
  90. mach_msg_type_number_t *new_stateCnt
  91. );
  92. __END_DECLS
  93. /********************** Caution **************************/
  94. /* The following data types should be used to calculate */
  95. /* maximum message sizes only. The actual message may be */
  96. /* smaller, and the position of the arguments within the */
  97. /* message layout may vary from what is presented here. */
  98. /* For example, if any of the arguments are variable- */
  99. /* sized, and less than the maximum is sent, the data */
  100. /* will be packed tight in the actual message to reduce */
  101. /* the presence of holes. */
  102. /********************** Caution **************************/
  103. /* typedefs for all requests */
  104. #ifndef __Request__mach_exc_subsystem__defined
  105. #define __Request__mach_exc_subsystem__defined
  106. #ifdef __MigPackStructs
  107. #pragma pack(4)
  108. #endif
  109. typedef struct {
  110. mach_msg_header_t Head;
  111. /* start of the kernel processed data */
  112. mach_msg_body_t msgh_body;
  113. mach_msg_port_descriptor_t thread;
  114. mach_msg_port_descriptor_t task;
  115. /* end of the kernel processed data */
  116. NDR_record_t NDR;
  117. exception_type_t exception;
  118. mach_msg_type_number_t codeCnt;
  119. int64_t code[2];
  120. } __Request__mach_exception_raise_t;
  121. #ifdef __MigPackStructs
  122. #pragma pack()
  123. #endif
  124. #ifdef __MigPackStructs
  125. #pragma pack(4)
  126. #endif
  127. typedef struct {
  128. mach_msg_header_t Head;
  129. NDR_record_t NDR;
  130. exception_type_t exception;
  131. mach_msg_type_number_t codeCnt;
  132. int64_t code[2];
  133. int flavor;
  134. mach_msg_type_number_t old_stateCnt;
  135. natural_t old_state[144];
  136. } __Request__mach_exception_raise_state_t;
  137. #ifdef __MigPackStructs
  138. #pragma pack()
  139. #endif
  140. #ifdef __MigPackStructs
  141. #pragma pack(4)
  142. #endif
  143. typedef struct {
  144. mach_msg_header_t Head;
  145. /* start of the kernel processed data */
  146. mach_msg_body_t msgh_body;
  147. mach_msg_port_descriptor_t thread;
  148. mach_msg_port_descriptor_t task;
  149. /* end of the kernel processed data */
  150. NDR_record_t NDR;
  151. exception_type_t exception;
  152. mach_msg_type_number_t codeCnt;
  153. int64_t code[2];
  154. int flavor;
  155. mach_msg_type_number_t old_stateCnt;
  156. natural_t old_state[144];
  157. } __Request__mach_exception_raise_state_identity_t;
  158. #ifdef __MigPackStructs
  159. #pragma pack()
  160. #endif
  161. #endif /* !__Request__mach_exc_subsystem__defined */
  162. /* union of all requests */
  163. #ifndef __RequestUnion__mach_exc_subsystem__defined
  164. #define __RequestUnion__mach_exc_subsystem__defined
  165. union __RequestUnion__mach_exc_subsystem {
  166. __Request__mach_exception_raise_t Request_mach_exception_raise;
  167. __Request__mach_exception_raise_state_t Request_mach_exception_raise_state;
  168. __Request__mach_exception_raise_state_identity_t Request_mach_exception_raise_state_identity;
  169. };
  170. #endif /* !__RequestUnion__mach_exc_subsystem__defined */
  171. /* typedefs for all replies */
  172. #ifndef __Reply__mach_exc_subsystem__defined
  173. #define __Reply__mach_exc_subsystem__defined
  174. #ifdef __MigPackStructs
  175. #pragma pack(4)
  176. #endif
  177. typedef struct {
  178. mach_msg_header_t Head;
  179. NDR_record_t NDR;
  180. kern_return_t RetCode;
  181. } __Reply__mach_exception_raise_t;
  182. #ifdef __MigPackStructs
  183. #pragma pack()
  184. #endif
  185. #ifdef __MigPackStructs
  186. #pragma pack(4)
  187. #endif
  188. typedef struct {
  189. mach_msg_header_t Head;
  190. NDR_record_t NDR;
  191. kern_return_t RetCode;
  192. int flavor;
  193. mach_msg_type_number_t new_stateCnt;
  194. natural_t new_state[144];
  195. } __Reply__mach_exception_raise_state_t;
  196. #ifdef __MigPackStructs
  197. #pragma pack()
  198. #endif
  199. #ifdef __MigPackStructs
  200. #pragma pack(4)
  201. #endif
  202. typedef struct {
  203. mach_msg_header_t Head;
  204. NDR_record_t NDR;
  205. kern_return_t RetCode;
  206. int flavor;
  207. mach_msg_type_number_t new_stateCnt;
  208. natural_t new_state[144];
  209. } __Reply__mach_exception_raise_state_identity_t;
  210. #ifdef __MigPackStructs
  211. #pragma pack()
  212. #endif
  213. #endif /* !__Reply__mach_exc_subsystem__defined */
  214. /* union of all replies */
  215. #ifndef __ReplyUnion__mach_exc_subsystem__defined
  216. #define __ReplyUnion__mach_exc_subsystem__defined
  217. union __ReplyUnion__mach_exc_subsystem {
  218. __Reply__mach_exception_raise_t Reply_mach_exception_raise;
  219. __Reply__mach_exception_raise_state_t Reply_mach_exception_raise_state;
  220. __Reply__mach_exception_raise_state_identity_t Reply_mach_exception_raise_state_identity;
  221. };
  222. #endif /* !__RequestUnion__mach_exc_subsystem__defined */
  223. #ifndef subsystem_to_name_map_mach_exc
  224. #define subsystem_to_name_map_mach_exc \
  225. { "mach_exception_raise_OVR", 2405 },\
  226. { "mach_exception_raise_state_OVR", 2406 },\
  227. { "mach_exception_raise_state_identity_OVR", 2407 }
  228. #endif
  229. #ifdef __AfterMigUserHeader
  230. __AfterMigUserHeader
  231. #endif /* __AfterMigUserHeader */
  232. #ifdef mig_external
  233. mig_external
  234. #else
  235. extern
  236. #endif /* mig_external */
  237. boolean_t mach_exc_server_OVR(
  238. mach_msg_header_t *InHeadP,
  239. mach_msg_header_t *OutHeadP);
  240. #if defined(__cplusplus)
  241. } // extern"C"
  242. #endif
  243. #endif /* _mach_exc_user_ */