Skip to content

Commit f0cfe84

Browse files
authored
Update 2device-driver-2.rst
1 parent b9110db commit f0cfe84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/chapter9/2device-driver-2.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ virtio驱动程序
478478
479479
avail.ring[(avail.idx + added++) % qsz] = head;
480480
481-
idx总是递增,在模以 ``qsz`` 后才能进行取描述符的操作:
481+
``idx`` 总是递增。由于上一行的取模操作,我们不必担心 ``idx > qsz`` 时会产生溢出。
482482

483483
.. code-block:: Rust
484484
@@ -535,4 +535,4 @@ idx总是递增,在模以 ``qsz`` 后才能进行取描述符的操作:
535535
}
536536
...
537537
538-
这里给出了virtio设备驱动通过中断来接收设备I/O响应的共性操作过程。如果结合具体的操作系统,还需与操作系统的总体中断处理、同步互斥、进程/线程调度进行结合。
538+
这里给出了virtio设备驱动通过中断来接收设备I/O响应的共性操作过程。如果结合具体的操作系统,还需与操作系统的总体中断处理、同步互斥、进程/线程调度进行结合。

0 commit comments

Comments
 (0)