* @brief 检查 Used Ring 中是否有已完成的缓冲区 * * 通过比较驱动程序上次处理的 idx 与设备当前的 idx, * 判断是否有新的已处理缓冲区可供回收。 * * @return true 表示有已完成的缓冲区可用,false 表示没有 * @see virtio-v1.2#2.7.14 Receiving Used Buffers From The Device */
| 397 | * @see virtio-v1.2#2.7.14 Receiving Used Buffers From The Device |
| 398 | */ |
| 399 | [[nodiscard]] auto HasUsed() const -> bool { |
| 400 | return last_used_idx_ != used_->idx; |
| 401 | } |
| 402 | |
| 403 | /** |
| 404 | * @brief 从 Used Ring 弹出一个已完成的元素 |
no outgoing calls
no test coverage detected