Compare commits
3 Commits
598bdb1410
...
267b893bf4
| Author | SHA1 | Date | |
|---|---|---|---|
| 267b893bf4 | |||
| d6b3af6e67 | |||
| 4be6f231e6 |
2
kernel
2
kernel
Submodule kernel updated: 1c7c90ef39...f8a7a4285f
@@ -115,7 +115,7 @@ int main(
|
|||||||
};
|
};
|
||||||
|
|
||||||
kern_handle_t channel;
|
kern_handle_t channel;
|
||||||
channel_create(0, 0, &channel);
|
channel_create(0, &channel);
|
||||||
|
|
||||||
launch_ctx_init(&launch);
|
launch_ctx_init(&launch);
|
||||||
launch.ctx_resolve_library = resolve_dependency;
|
launch.ctx_resolve_library = resolve_dependency;
|
||||||
|
|||||||
@@ -86,8 +86,7 @@ static int emit_header_lib_impl(struct emit_ctx *ctx)
|
|||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
emit(ctx,
|
emit(ctx,
|
||||||
"struct iovec iov = IOVEC(out_hdr, sizeof *out_hdr);\n"
|
"struct iovec iov = IOVEC(out_hdr, sizeof *out_hdr);\n"
|
||||||
"struct msg kmsg = MSG(&iov, 1, NULL, 0);\n"
|
"kern_status_t status = msg_recv(channel, out_id, &iov, 1);\n"
|
||||||
"kern_status_t status = msg_recv(channel, 0, out_id, &kmsg);\n"
|
|
||||||
"if (status != KERN_OK) return status;\n"
|
"if (status != KERN_OK) return status;\n"
|
||||||
"if (out_hdr->hdr_magic != MSG_MAGIC) return KERN_INVALID_ARGUMENT;\n"
|
"if (out_hdr->hdr_magic != MSG_MAGIC) return KERN_INVALID_ARGUMENT;\n"
|
||||||
"return KERN_OK;\n");
|
"return KERN_OK;\n");
|
||||||
@@ -146,8 +145,7 @@ static int emit_header_lib_impl(struct emit_ctx *ctx)
|
|||||||
|
|
||||||
emit(ctx,
|
emit(ctx,
|
||||||
"struct iovec iov = IOVEC(&resp_data, sizeof resp_data);\n"
|
"struct iovec iov = IOVEC(&resp_data, sizeof resp_data);\n"
|
||||||
"struct msg resp = MSG(&iov, 1, NULL, 0);\n"
|
"return msg_reply(channel, id, &iov, 1);\n");
|
||||||
"return msg_reply(channel, 0, id, &resp);\n");
|
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
|
||||||
emit_unindent(ctx);
|
emit_unindent(ctx);
|
||||||
@@ -524,12 +522,7 @@ static int emit_interface_msg_function_send_impl(
|
|||||||
emit_unindent(ctx);
|
emit_unindent(ctx);
|
||||||
emit(ctx, "};\n\n");
|
emit(ctx, "};\n\n");
|
||||||
|
|
||||||
emit(ctx, "struct msg req = MSG(req_iov, %zu, NULL, 0);\n", nr_req_iov);
|
emit(ctx, "kern_status_t status = msg_send(port, req_iov, %zu, resp_iov, %zu);\n", nr_req_iov, nr_resp_iov);
|
||||||
emit(ctx,
|
|
||||||
"struct msg resp = MSG(resp_iov, %zu, NULL, 0);\n",
|
|
||||||
nr_resp_iov);
|
|
||||||
|
|
||||||
emit(ctx, "kern_status_t status = msg_send(port, 0, &req, &resp);\n");
|
|
||||||
emit(ctx, "if (status != KERN_OK) return status;\n\n");
|
emit(ctx, "if (status != KERN_OK) return status;\n\n");
|
||||||
|
|
||||||
entry = b_queue_first(&msg->msg_results);
|
entry = b_queue_first(&msg->msg_results);
|
||||||
@@ -735,8 +728,7 @@ static int emit_interface_msg_function_reply_impl(
|
|||||||
emit_unindent(ctx);
|
emit_unindent(ctx);
|
||||||
emit(ctx, "};\n\n");
|
emit(ctx, "};\n\n");
|
||||||
|
|
||||||
emit(ctx, "struct msg reply = MSG(iov, %zu, NULL, 0);\n", nr_iov);
|
emit(ctx, "return msg_reply(channel, id, iov, %zu);\n", nr_iov);
|
||||||
emit(ctx, "return msg_reply(channel, 0, id, &reply);\n");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user