[libc-commits] [libc] [libc] Fix 'finish()' being called by the client instead of the server (PR #191226)

via libc-commits libc-commits at lists.llvm.org
Thu Apr 9 08:54:06 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

<details>
<summary>Changes</summary>

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.


---
Full diff: https://github.com/llvm/llvm-project/pull/191226.diff


1 Files Affected:

- (modified) libc/shared/rpc.h (+1-1) 


``````````diff
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);
   }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/191226


More information about the libc-commits mailing list