[libc-commits] [libc] [libc] Fix 'finish()' being called by the client instead of the server (PR #191226)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Thu Apr 9 08:53:24 PDT 2026
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/191226
Summary:
This function is supposed to manage the doorbell interrupts. The flow
that was intended was that the client notified work to wake the server
and the server finished the work so it didn't go back to sleep until
everything was done. This was reversed and we had the client finishing
work and then stalling on it.
>From 056ef3d95b51182966f9d9859447b67d8190e1ce Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Thu, 9 Apr 2026 10:49:16 -0500
Subject: [PATCH] [libc] Fix 'finish()' being called by the client instead of
the server
Summary:
This function is supposed to manage the doorbell interrupts. The flow
that was intended was that the client notified work to wake the server
and the server finished the work so it didn't go back to sleep until
everything was done. This was reversed and we had the client finishing
work and then stalling on it.
---
libc/shared/rpc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/shared/rpc.h b/libc/shared/rpc.h
index 904c143c19805..5168e9fc60ba3 100644
--- a/libc/shared/rpc.h
+++ b/libc/shared/rpc.h
@@ -417,7 +417,7 @@ template <bool T> struct Port {
if (owns_buffer && T)
out = process.invert_outbox(lane_mask, index, out);
process.unlock(lane_mask, index);
- if constexpr (!T)
+ if constexpr (T)
process.finish(lane_mask);
}
More information about the libc-commits
mailing list