summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Dariz <luca@orpolo.org>2022-06-28 11:49:27 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-27 23:55:56 +0200
commit68b3d8fe3a9595b7a5cb2bb6bc5973ba26139704 (patch)
treef0ad60ac9abb22e18c1effe87db592b7c9433509
parent6aec25c58dd76ad4506ee7b5830ced92ab58ca0e (diff)
fill msg size in the header for user stubsv1.8+git20220827
* user.c: - adjust comment in generated file - set msgh_size with the same value passed to mach_msg() Signed-off-by: Luca Dariz <luca@orpolo.org> Message-Id: <20220628094927.442907-4-luca@orpolo.org>
-rw-r--r--user.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/user.c b/user.c
index 9a84fe4..886198b 100644
--- a/user.c
+++ b/user.c
@@ -159,7 +159,7 @@ WriteRequestHead(FILE *file, const routine_t *rt)
WriteHeaderPortType(rt->rtUReplyPort));
}
- fprintf(file, "\t/* msgh_size passed as argument */\n");
+ fprintf(file, "\t/* msgh_size filled below */\n");
/*
* KernelUser stubs need to cast the request and reply ports
@@ -282,6 +282,8 @@ WriteMsgSend(FILE *file, const routine_t *rt)
else
strcpy(SendSize, "msgh_size");
+ fprintf(file, "\tInP->Head.msgh_size = %s;\n\n", SendSize);
+
if (IsKernelUser)
{
fprintf(file, "\t%s %smach_msg_send_from_kernel(",
@@ -348,6 +350,8 @@ WriteMsgRPC(FILE *file, const routine_t *rt)
} else
strcpy(SendSize, "msgh_size");
+ fprintf(file, "\tInP->Head.msgh_size = %s;\n\n", SendSize);
+
if (IsKernelUser)
fprintf(file, "\tmsg_result = %smach_msg_rpc_from_kernel(&InP->Head, %s, sizeof(Reply));\n",
SubrPrefix,