[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-dev] [PATCH 4/5] feedback: disable interrupts in example code
"Michael S. Tsirkin" <mst@redhat.com> writes: > example code does not have to be optimal but it > seems cleaner to disable interrupts after we > recheck the ring empty state. > > Cc: Arun Subbarao <asubbarao@lnxw.com> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Indeed, it's clearer. Acked-by: Rusty Russell <rusty@rustcorp.com.au> Thanks, Rusty. > --- > content.tex | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/content.tex b/content.tex > index e6c6a3f..365df87 100644 > --- a/content.tex > +++ b/content.tex > @@ -755,6 +755,8 @@ suppressed by the device: > > 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]; > -- > MST > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]