From 261e83f3478c58327444d88db755444659f30574 Mon Sep 17 00:00:00 2001
From: rusty <rusty@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>
Date: Mon, 10 Feb 2014 10:31:48 +0000
Subject: example code does not have to be optimal but it seems cleaner to
 disable interrupts after we recheck the ring empty state.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@218 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
---
 content.tex | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'content.tex')

diff --git a/content.tex b/content.tex
index 2adc393..bc53749 100644
--- a/content.tex
+++ b/content.tex
@@ -760,6 +760,8 @@ for (;;) {
 
                 if (vq->last_seen_used != le16_to_cpu(vring->used.idx))
                         break;
+
+                vring_disable_interrupts(vq);
         }
 
         struct vring_used_elem *e = vring.used->ring[vq->last_seen_used%vsz];
-- 
cgit v1.2.3

