diff options
author | Luca Dariz <luca@orpolo.org> | 2022-06-28 11:49:27 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-08-27 23:55:56 +0200 |
commit | 68b3d8fe3a9595b7a5cb2bb6bc5973ba26139704 (patch) | |
tree | f0ad60ac9abb22e18c1effe87db592b7c9433509 | |
parent | 6aec25c58dd76ad4506ee7b5830ced92ab58ca0e (diff) | |
download | mig-68b3d8fe3a9595b7a5cb2bb6bc5973ba26139704.tar.gz mig-68b3d8fe3a9595b7a5cb2bb6bc5973ba26139704.tar.bz2 mig-68b3d8fe3a9595b7a5cb2bb6bc5973ba26139704.zip |
fill msg size in the header for user stubs
* 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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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, |