Skip to content

Commit

Permalink
Merge pull request #206 from PorterLu/virtio_idx
Browse files Browse the repository at this point in the history
idx should always increase
  • Loading branch information
scPointer authored Jul 9, 2024
2 parents 6adbe3f + f0cfe84 commit 6d53a9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/chapter9/2device-driver-2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ virtio驱动程序
avail.ring[(avail.idx + added++) % qsz] = head;
idx总是递增,并在到达 ``qsz`` 后又回到0:
``idx`` 总是递增。由于上一行的取模操作,我们不必担心 ``idx > qsz`` 时会产生溢出。

.. code-block:: Rust
Expand Down Expand Up @@ -535,4 +535,4 @@ idx总是递增,并在到达 ``qsz`` 后又回到0:
}
...
这里给出了virtio设备驱动通过中断来接收设备I/O响应的共性操作过程。如果结合具体的操作系统,还需与操作系统的总体中断处理、同步互斥、进程/线程调度进行结合。
这里给出了virtio设备驱动通过中断来接收设备I/O响应的共性操作过程。如果结合具体的操作系统,还需与操作系统的总体中断处理、同步互斥、进程/线程调度进行结合。

0 comments on commit 6d53a9a

Please sign in to comment.