aboutsummaryrefslogtreecommitdiff
path: root/generated/manual-mach.inc.h
diff options
context:
space:
mode:
authorcomex2016-07-12 20:08:53 -0400
committercomex2016-07-12 20:08:53 -0400
commit7b262dfa85aab60479be332d9437405739ec915c (patch)
tree33f78066f9a31834f64a09c99ceccb94ac7eb05f /generated/manual-mach.inc.h
parentcomment (diff)
downloadsubstitute-7b262dfa85aab60479be332d9437405739ec915c.tar.gz
replace broken gen-manual-mach.sh with a Python version
it was dropping the #pragma pack(4) declarations, rendering it broken for like most of the last year
Diffstat (limited to 'generated/manual-mach.inc.h')
-rw-r--r--generated/manual-mach.inc.h245
1 files changed, 77 insertions, 168 deletions
diff --git a/generated/manual-mach.inc.h b/generated/manual-mach.inc.h
index 2d14eab..426af42 100644
--- a/generated/manual-mach.inc.h
+++ b/generated/manual-mach.inc.h
@@ -1,67 +1,3 @@
-
-/* Module thread_act */
-
-#include <string.h>
-#include <mach/ndr.h>
-#include <mach/boolean.h>
-#include <mach/kern_return.h>
-#include <mach/notify.h>
-#include <mach/mach_types.h>
-#include <mach/message.h>
-#include <mach/mig_errors.h>
-#include <mach/port.h>
-
-/* BEGIN VOUCHER CODE */
-
-#ifndef KERNEL
-#if defined(__has_include)
-#if __has_include(<mach/mig_voucher_support.h>)
-#define USING_VOUCHERS
-#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
-#define __VOUCHER_FORWARD_TYPE_DECLS__
-#ifdef __cplusplus
-static "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif // __VOUCHER_FORWARD_TYPE_DECLS__
-#endif // __has_include(<mach/mach_voucher_types.h>)
-#endif // __has_include
-#endif // !KERNEL
-
-/* END VOUCHER CODE */
-
-
-#ifdef AUTOTEST
-#ifndef FUNCTION_PTR_T
-#define FUNCTION_PTR_T
-typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
-typedef struct {
- char *name;
- function_ptr_t function;
-} function_table_entry;
-typedef function_table_entry *function_table_t;
-#endif /* FUNCTION_PTR_T */
-#endif /* AUTOTEST */
-
-#ifndef thread_act_MSG_COUNT
-#define thread_act_MSG_COUNT 28
-#endif /* thread_act_MSG_COUNT */
-
-#include <mach/std_types.h>
-#include <mach/mig.h>
-#include <mach/mig.h>
-#include <mach/mach_types.h>
-
-#ifdef __BeforeMigUserHeader
-__BeforeMigUserHeader
-#endif /* __BeforeMigUserHeader */
-
-#include <sys/cdefs.h>
-__BEGIN_DECLS
-
-
/* Routine thread_get_state */
static
kern_return_t manual_thread_get_state
@@ -71,7 +7,6 @@ kern_return_t manual_thread_get_state
thread_state_t old_state,
mach_msg_type_number_t *old_stateCnt
, mach_port_t reply_port);
-
/* Routine thread_set_state */
static
kern_return_t manual_thread_set_state
@@ -81,14 +16,21 @@ kern_return_t manual_thread_set_state
thread_state_t new_state,
mach_msg_type_number_t new_stateCnt
, mach_port_t reply_port);
-
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
thread_state_flavor_t flavor;
mach_msg_type_number_t old_stateCnt;
} __Request__manual_thread_get_state_t __attribute__((unused));
-
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
@@ -96,7 +38,12 @@ kern_return_t manual_thread_set_state
mach_msg_type_number_t new_stateCnt;
natural_t new_state[224];
} __Request__manual_thread_set_state_t __attribute__((unused));
-
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
@@ -104,34 +51,20 @@ kern_return_t manual_thread_set_state
mach_msg_type_number_t old_stateCnt;
natural_t old_state[224];
} __Reply__manual_thread_get_state_t __attribute__((unused));
-
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__manual_thread_set_state_t __attribute__((unused));
-
-
-/*
- * IDENTIFICATION:
- * stub generated Tue Oct 27 21:33:54 2015
- * with a MiG generated by bootstrap_cmds-93
- * OPTIONS:
- */
-#define __MIG_check__Reply__manual_thread_act_subsystem__ 1
-
-
-
-#ifndef mig_internal
-#define mig_internal static __inline__
-#endif /* mig_internal */
-
-
-
-#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
-#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
-#endif /* !defined(__MigKernelSpecificCode) */
-
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
#ifndef LimitCheck
#define LimitCheck 0
#endif /* LimitCheck */
@@ -148,9 +81,7 @@ kern_return_t manual_thread_set_state
#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
#endif /* !defined(_WALIGNSZ_) */
-#ifndef UseStaticTemplates
#define UseStaticTemplates 0
-#endif /* UseStaticTemplates */
#ifndef __MachMsgErrorWithTimeout
#define __MachMsgErrorWithTimeout(_R_) { \
@@ -211,10 +142,10 @@ kern_return_t manual_thread_set_state
-#if !defined(__MIG_check__Reply__manual_thread_get_state_t__defined)
-#define __MIG_check__Reply__manual_thread_get_state_t__defined
-mig_internal kern_return_t __MIG_check__Reply__manual_thread_get_state_t(__Reply__manual_thread_get_state_t *Out0P)
+
+
+static kern_return_t __MIG_check__Reply__manual_thread_get_state_t(__Reply__manual_thread_get_state_t *Out0P)
{
typedef __Reply__manual_thread_get_state_t __Reply __attribute__((unused));
@@ -247,7 +178,11 @@ mig_internal kern_return_t __MIG_check__Reply__manual_thread_get_state_t(__Reply
return MACH_MSG_SUCCESS;
}
-#endif /* !defined(__MIG_check__Reply__manual_thread_get_state_t__defined) */
+
+
+
+
+
/* Routine thread_get_state */
static kern_return_t manual_thread_get_state
(
@@ -317,9 +252,9 @@ static kern_return_t manual_thread_get_state
mach_msg_return_t msg_result;
-#ifdef __MIG_check__Reply__manual_thread_get_state_t__defined
+
kern_return_t check_result;
-#endif /* __MIG_check__Reply__manual_thread_get_state_t__defined */
+
__DeclareSendRpc(3603, "thread_get_state")
@@ -338,11 +273,9 @@ static kern_return_t manual_thread_get_state
InP->Head.msgh_request_port = target_act;
InP->Head.msgh_reply_port = reply_port;
InP->Head.msgh_id = 3603;
+ InP->Head.msgh_reserved = 0;
-/* BEGIN VOUCHER CODE */
-
-/* END VOUCHER CODE */
__BeforeSendRpc(3603, "thread_get_state")
msg_result = manual_mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
@@ -353,11 +286,11 @@ static kern_return_t manual_thread_get_state
}
-#if defined(__MIG_check__Reply__manual_thread_get_state_t__defined)
+
check_result = __MIG_check__Reply__manual_thread_get_state_t((__Reply__manual_thread_get_state_t *)Out0P);
if (check_result != MACH_MSG_SUCCESS)
{ return check_result; }
-#endif /* defined(__MIG_check__Reply__manual_thread_get_state_t__defined) */
+
if (Out0P->old_stateCnt > *old_stateCnt) {
(void)manual_memcpy((char *) old_state, (const char *) Out0P->old_state, 4 * *old_stateCnt);
@@ -371,10 +304,12 @@ static kern_return_t manual_thread_get_state
return KERN_SUCCESS;
}
-#if !defined(__MIG_check__Reply__manual_thread_set_state_t__defined)
-#define __MIG_check__Reply__manual_thread_set_state_t__defined
-mig_internal kern_return_t __MIG_check__Reply__manual_thread_set_state_t(__Reply__manual_thread_set_state_t *Out0P)
+
+
+
+
+static kern_return_t __MIG_check__Reply__manual_thread_set_state_t(__Reply__manual_thread_set_state_t *Out0P)
{
typedef __Reply__manual_thread_set_state_t __Reply __attribute__((unused));
@@ -393,7 +328,11 @@ mig_internal kern_return_t __MIG_check__Reply__manual_thread_set_state_t(__Reply
return Out0P->RetCode;
}
}
-#endif /* !defined(__MIG_check__Reply__manual_thread_set_state_t__defined) */
+
+
+
+
+
/* Routine thread_set_state */
static kern_return_t manual_thread_set_state
(
@@ -461,9 +400,9 @@ static kern_return_t manual_thread_set_state
mach_msg_return_t msg_result;
unsigned int msgh_size;
-#ifdef __MIG_check__Reply__manual_thread_set_state_t__defined
+
kern_return_t check_result;
-#endif /* __MIG_check__Reply__manual_thread_set_state_t__defined */
+
__DeclareSendRpc(3604, "thread_set_state")
@@ -485,11 +424,9 @@ static kern_return_t manual_thread_set_state
InP->Head.msgh_request_port = target_act;
InP->Head.msgh_reply_port = reply_port;
InP->Head.msgh_id = 3604;
+ InP->Head.msgh_reserved = 0;
-/* BEGIN VOUCHER CODE */
-
-/* END VOUCHER CODE */
__BeforeSendRpc(3604, "thread_set_state")
msg_result = manual_mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, msgh_size, (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
@@ -500,15 +437,14 @@ static kern_return_t manual_thread_set_state
}
-#if defined(__MIG_check__Reply__manual_thread_set_state_t__defined)
+
check_result = __MIG_check__Reply__manual_thread_set_state_t((__Reply__manual_thread_set_state_t *)Out0P);
if (check_result != MACH_MSG_SUCCESS)
{ return check_result; }
-#endif /* defined(__MIG_check__Reply__manual_thread_set_state_t__defined) */
+
return KERN_SUCCESS;
}
-
/* Routine mach_vm_remap */
static
kern_return_t manual_mach_vm_remap
@@ -525,7 +461,9 @@ kern_return_t manual_mach_vm_remap
vm_prot_t *max_protection,
vm_inherit_t inheritance
, mach_port_t reply_port);
-
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
@@ -541,7 +479,12 @@ kern_return_t manual_mach_vm_remap
boolean_t copy;
vm_inherit_t inheritance;
} __Request__manual_mach_vm_remap_t __attribute__((unused));
-
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
+#ifdef __MigPackStructs
+#pragma pack(4)
+#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
@@ -550,28 +493,9 @@ kern_return_t manual_mach_vm_remap
vm_prot_t cur_protection;
vm_prot_t max_protection;
} __Reply__manual_mach_vm_remap_t __attribute__((unused));
-
-
-/*
- * IDENTIFICATION:
- * stub generated Tue Oct 27 21:33:54 2015
- * with a MiG generated by bootstrap_cmds-93
- * OPTIONS:
- */
-#define __MIG_check__Reply__manual_mach_vm_subsystem__ 1
-
-
-
-#ifndef mig_internal
-#define mig_internal static __inline__
-#endif /* mig_internal */
-
-
-
-#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
-#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
-#endif /* !defined(__MigKernelSpecificCode) */
-
+#ifdef __MigPackStructs
+#pragma pack()
+#endif
#ifndef LimitCheck
#define LimitCheck 0
#endif /* LimitCheck */
@@ -588,9 +512,7 @@ kern_return_t manual_mach_vm_remap
#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
#endif /* !defined(_WALIGNSZ_) */
-#ifndef UseStaticTemplates
#define UseStaticTemplates 0
-#endif /* UseStaticTemplates */
#ifndef __MachMsgErrorWithTimeout
#define __MachMsgErrorWithTimeout(_R_) { \
@@ -651,10 +573,10 @@ kern_return_t manual_mach_vm_remap
-#if !defined(__MIG_check__Reply__manual_mach_vm_remap_t__defined)
-#define __MIG_check__Reply__manual_mach_vm_remap_t__defined
-mig_internal kern_return_t __MIG_check__Reply__manual_mach_vm_remap_t(__Reply__manual_mach_vm_remap_t *Out0P)
+
+
+static kern_return_t __MIG_check__Reply__manual_mach_vm_remap_t(__Reply__manual_mach_vm_remap_t *Out0P)
{
typedef __Reply__manual_mach_vm_remap_t __Reply __attribute__((unused));
@@ -680,7 +602,11 @@ mig_internal kern_return_t __MIG_check__Reply__manual_mach_vm_remap_t(__Reply__m
return MACH_MSG_SUCCESS;
}
-#endif /* !defined(__MIG_check__Reply__manual_mach_vm_remap_t__defined) */
+
+
+
+
+
/* Routine mach_vm_remap */
static kern_return_t manual_mach_vm_remap
(
@@ -768,31 +694,17 @@ static kern_return_t manual_mach_vm_remap
mach_msg_return_t msg_result;
-#ifdef __MIG_check__Reply__manual_mach_vm_remap_t__defined
+
kern_return_t check_result;
-#endif /* __MIG_check__Reply__manual_mach_vm_remap_t__defined */
+
__DeclareSendRpc(4813, "mach_vm_remap")
-#if UseStaticTemplates
- const static mach_msg_port_descriptor_t src_taskTemplate = {
- /* name = */ MACH_PORT_NULL,
- /* pad1 = */ 0,
- /* pad2 = */ 0,
- /* disp = */ 19,
- /* type = */ MACH_MSG_PORT_DESCRIPTOR,
- };
-#endif /* UseStaticTemplates */
InP->msgh_body.msgh_descriptor_count = 1;
-#if UseStaticTemplates
- InP->src_task = src_taskTemplate;
- InP->src_task.name = src_task;
-#else /* UseStaticTemplates */
InP->src_task.name = src_task;
InP->src_task.disposition = 19;
InP->src_task.type = MACH_MSG_PORT_DESCRIPTOR;
-#endif /* UseStaticTemplates */
InP->NDR = NDR_record;
@@ -816,11 +728,9 @@ static kern_return_t manual_mach_vm_remap
InP->Head.msgh_request_port = target_task;
InP->Head.msgh_reply_port = reply_port;
InP->Head.msgh_id = 4813;
+ InP->Head.msgh_reserved = 0;
-/* BEGIN VOUCHER CODE */
-
-/* END VOUCHER CODE */
__BeforeSendRpc(4813, "mach_vm_remap")
msg_result = manual_mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(Request), (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
@@ -831,11 +741,11 @@ static kern_return_t manual_mach_vm_remap
}
-#if defined(__MIG_check__Reply__manual_mach_vm_remap_t__defined)
+
check_result = __MIG_check__Reply__manual_mach_vm_remap_t((__Reply__manual_mach_vm_remap_t *)Out0P);
if (check_result != MACH_MSG_SUCCESS)
{ return check_result; }
-#endif /* defined(__MIG_check__Reply__manual_mach_vm_remap_t__defined) */
+
*target_address = Out0P->target_address;
@@ -845,4 +755,3 @@ static kern_return_t manual_mach_vm_remap
return KERN_SUCCESS;
}
-