Skip to content

Commit

Permalink
deploy: 6d53a9a
Browse files Browse the repository at this point in the history
  • Loading branch information
scPointer committed Jul 9, 2024
1 parent 31b29d3 commit 77c5360
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions _sources/chapter9/2device-driver-2.rst.txt
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响应的共性操作过程。如果结合具体的操作系统,还需与操作系统的总体中断处理、同步互斥、进程/线程调度进行结合。
2 changes: 1 addition & 1 deletion chapter9/2device-driver-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ <h3><strong>发出I/O请求的过程</strong><a class="headerlink" href="#id13"
<div class="highlight-Rust notranslate"><div class="highlight"><pre><span></span><span class="n">avail</span><span class="p">.</span><span class="n">ring</span><span class="p">[(</span><span class="n">avail</span><span class="p">.</span><span class="n">idx</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">added</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="o">%</span><span class="w"> </span><span class="n">qsz</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">head</span><span class="p">;</span>
</pre></div>
</div>
<p>idx总是递增,并在到达 <code class="docutils literal notranslate"><span class="pre">qsz</span></code> 后又回到0:</p>
<p><code class="docutils literal notranslate"><span class="pre">idx</span></code> 总是递增。由于上一行的取模操作,我们不必担心 <code class="docutils literal notranslate"><span class="pre">idx</span> <span class="pre">&gt;</span> <span class="pre">qsz</span></code> 时会产生溢出。</p>
<div class="highlight-Rust notranslate"><div class="highlight"><pre><span></span><span class="n">avail</span><span class="p">.</span><span class="n">idx</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">added</span><span class="p">;</span>
</pre></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 77c5360

Please sign in to comment.