vu_queue_flush(VuDev *dev, VuVirtq *vq, unsigned int count)

{

    uint16_t old, new;



    if (unlikely(dev->broken)) {

        return;

    }



    /* Make sure buffer is written before we update index. */

    smp_wmb();



    old = vq->used_idx;

    new = old + count;

    vring_used_idx_set(dev, vq, new);

    vq->inuse -= count;

    if (unlikely((int16_t)(new - vq->signalled_used) < (uint16_t)(new - old))) {

        vq->signalled_used_valid = false;

    }

}

vu_queue_flush(VuDev *dev, VuVirtq *vq, unsigned int count)

{

    uint16_t old, new;



    if (unlikely(dev->broken)) {

        return;

    }



    

    smp_wmb();



    old = vq->used_idx;

    new = old + count;

    vring_used_idx_set(dev, vq, new);

    vq->inuse -= count;

    if (unlikely((int16_t)(new - vq->signalled_used) < (uint16_t)(new - old))) {

        vq->signalled_used_valid = false;

    }

}

    if (unlikely(dev->broken)) {     if (unlikely(dev->broken)) {     if (unlikely(dev->broken)) {     if (unlikely(dev->broken)) {
FUNC_0(VuDev *VAR_0, VuVirtq *VAR_1, unsigned int VAR_2)

{

    uint16_t old, new;



    if (unlikely(VAR_0->broken)) {

        return;

    }



    

    smp_wmb();



    old = VAR_1->used_idx;

    new = old + VAR_2;

    vring_used_idx_set(VAR_0, VAR_1, new);

    VAR_1->inuse -= VAR_2;

    if (unlikely((int16_t)(new - VAR_1->signalled_used) < (uint16_t)(new - old))) {

        VAR_1->signalled_used_valid = false;

    }

}

FUNC_0(VuDev *VAR_0, VuVirtq *VAR_1, unsigned int VAR_2)
{ uint16_t old, new; if (unlikely(VAR_0->broken)) { return; } smp_wmb(); old = VAR_1->used_idx; new = old + VAR_2; vring_used_idx_set(VAR_0, VAR_1, new); VAR_1->inuse -= VAR_2; if (unlikely((int16_t)(new - VAR_1->signalled_used) < (uint16_t)(new - old))) { VAR_1->signalled_used_valid = false; } }