~ubuntu-branches/debian/experimental/linux-tools/experimental

« back to all changes in this revision

Viewing changes to tools/virtio/virtio_test.c

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-02-02 16:57:49 UTC
  • mfrom: (1.1.10) (0.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20140202165749-tw94o9t1t0a8txk6
Tags: 3.13-1~exp2
Merge changes from sid up to 3.12.6-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
        struct vhost_memory *mem;
42
42
};
43
43
 
44
 
void vq_notify(struct virtqueue *vq)
 
44
bool vq_notify(struct virtqueue *vq)
45
45
{
46
46
        struct vq_info *info = vq->priv;
47
47
        unsigned long long v = 1;
48
48
        int r;
49
49
        r = write(info->kick, &v, sizeof v);
50
50
        assert(r == sizeof v);
 
51
        return true;
51
52
}
52
53
 
53
54
void vq_callback(struct virtqueue *vq)
171
172
                                                         GFP_ATOMIC);
172
173
                                if (likely(r == 0)) {
173
174
                                        ++started;
174
 
                                        virtqueue_kick(vq->vq);
 
175
                                        if (unlikely(!virtqueue_kick(vq->vq))
 
176
                                                r = -1;
175
177
                                }
176
178
                        } else
177
179
                                r = -1;