[libc-commits] [libc] [llvm] [libc] Support AMDGPU device interrupts for the RPC interface (PR #188067)

Matt Arsenault via libc-commits libc-commits at lists.llvm.org
Tue Mar 24 05:38:09 PDT 2026


================
@@ -112,6 +128,34 @@ template <bool Invert> struct Process {
     return buffer_offset(port_count) + buffer_bytes(port_count, lane_size);
   }
 
+  /// Ring the doorbell if the protocol was configured with one.
+  RPC_ATTRS void notify(uint64_t lane_mask) const {
+    if (!doorbell->value)
+      return;
+
+    uint32_t event_id = rpc::broadcast_value(lane_mask, doorbell->event_id);
+    if (rpc::is_first_lane(lane_mask)) {
+      if (!__scoped_atomic_fetch_add(doorbell->value, 1UL, __ATOMIC_RELAXED,
----------------
arsenm wrote:

Should these be atomic inc/dec? Is there a limit to saturate to or does it really want wraparound? 

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


More information about the libc-commits mailing list