Displaying 2 results from an estimated 2 matches for "vring_used_buffer_atomic".
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...user(used_idx, &vr->ring.used->idx) != 0)
+ return;
+
+ copy_to_user(&vr->ring.used->ring[used_idx & vr->mask], &used,
+ sizeof(used));
+ wmb();
+ used_idx++;
+ put_user(used_idx, &vr->ring.used->idx);
+}
+EXPORT_SYMBOL_GPL(vring_used_buffer);
+
+void vring_used_buffer_atomic(struct vring_info *vr, int id, u32 len)
+{
+ struct vring_used_elem *used;
+
+ BUG_ON(id <= 0 || id > vr->ring.num);
+ BUG_ON(!vr->used);
+
+ used = &vr->used->ring[vr->used->idx & vr->mask];
+ used->id = id - 1;
+ used->len = len;
+ /* Make sure buffer is w...
2008 Apr 05
11
[PATCH RFC 1/5] vringfd syscall
...user(used_idx, &vr->ring.used->idx) != 0)
+ return;
+
+ copy_to_user(&vr->ring.used->ring[used_idx & vr->mask], &used,
+ sizeof(used));
+ wmb();
+ used_idx++;
+ put_user(used_idx, &vr->ring.used->idx);
+}
+EXPORT_SYMBOL_GPL(vring_used_buffer);
+
+void vring_used_buffer_atomic(struct vring_info *vr, int id, u32 len)
+{
+ struct vring_used_elem *used;
+
+ BUG_ON(id <= 0 || id > vr->ring.num);
+ BUG_ON(!vr->used);
+
+ used = &vr->used->ring[vr->used->idx & vr->mask];
+ used->id = id - 1;
+ used->len = len;
+ /* Make sure buffer is w...