Compare commits

..

3 Commits

Author SHA1 Message Date
267b893bf4 meta: update kernel 2026-02-26 20:55:40 +00:00
d6b3af6e67 toolchain: ifc: update mpc api usage 2026-02-26 20:51:41 +00:00
4be6f231e6 bootstrap: update channel creation 2026-02-26 20:51:19 +00:00
3 changed files with 6 additions and 14 deletions

2
kernel

Submodule kernel updated: 1c7c90ef39...f8a7a4285f

View File

@@ -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;

View File

@@ -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;
} }