MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / HasUsed

Method HasUsed

src/device/virtio/virt_queue/split.hpp:399–401  ·  view source on GitHub ↗

* @brief 检查 Used Ring 中是否有已完成的缓冲区 * * 通过比较驱动程序上次处理的 idx 与设备当前的 idx, * 判断是否有新的已处理缓冲区可供回收。 * * @return true 表示有已完成的缓冲区可用,false 表示没有 * @see virtio-v1.2#2.7.14 Receiving Used Buffers From The Device */

Source from the content-addressed store, hash-verified

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 弹出一个已完成的元素

Callers 3

ProcessCompletionsMethod · 0.80
SubmitSyncRequestMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected