static void notify_guest_bh(void *opaque)

{

    VirtIOBlockDataPlane *s = opaque;

    unsigned nvqs = s->conf->num_queues;

    unsigned long bitmap[BITS_TO_LONGS(nvqs)];

    unsigned j;



    memcpy(bitmap, s->batch_notify_vqs, sizeof(bitmap));

    memset(s->batch_notify_vqs, 0, sizeof(bitmap));



    for (j = 0; j < nvqs; j += BITS_PER_LONG) {

        unsigned long bits = bitmap[j];



        while (bits != 0) {

            unsigned i = j + ctzl(bits);

            VirtQueue *vq = virtio_get_queue(s->vdev, i);



            if (virtio_should_notify(s->vdev, vq)) {

                event_notifier_set(virtio_queue_get_guest_notifier(vq));

            }



            bits &= bits - 1; /* clear right-most bit */

        }

    }

}

static void notify_guest_bh(void *opaque)

{

    VirtIOBlockDataPlane *s = opaque;

    unsigned nvqs = s->conf->num_queues;

    unsigned long bitmap[BITS_TO_LONGS(nvqs)];

    unsigned j;



    memcpy(bitmap, s->batch_notify_vqs, sizeof(bitmap));

    memset(s->batch_notify_vqs, 0, sizeof(bitmap));



    for (j = 0; j < nvqs; j += BITS_PER_LONG) {

        unsigned long bits = bitmap[j];



        while (bits != 0) {

            unsigned i = j + ctzl(bits);

            VirtQueue *vq = virtio_get_queue(s->vdev, i);



            if (virtio_should_notify(s->vdev, vq)) {

                event_notifier_set(virtio_queue_get_guest_notifier(vq));

            }



            bits &= bits - 1; 

        }

    }

}

            if (virtio_should_notify(s->vdev, vq)) {                 event_notifier_set(virtio_queue_get_guest_notifier(vq));
static void FUNC_0(void *VAR_0)

{

    VirtIOBlockDataPlane *s = VAR_0;

    unsigned VAR_1 = s->conf->num_queues;

    unsigned long VAR_2[BITS_TO_LONGS(VAR_1)];

    unsigned VAR_3;



    memcpy(VAR_2, s->batch_notify_vqs, sizeof(VAR_2));

    memset(s->batch_notify_vqs, 0, sizeof(VAR_2));



    for (VAR_3 = 0; VAR_3 < VAR_1; VAR_3 += BITS_PER_LONG) {

        unsigned long VAR_4 = VAR_2[VAR_3];



        while (VAR_4 != 0) {

            unsigned VAR_5 = VAR_3 + ctzl(VAR_4);

            VirtQueue *vq = virtio_get_queue(s->vdev, VAR_5);



            if (virtio_should_notify(s->vdev, vq)) {

                event_notifier_set(virtio_queue_get_guest_notifier(vq));

            }



            VAR_4 &= VAR_4 - 1; 

        }

    }

}

static void FUNC_0(void *VAR_0)
{ VirtIOBlockDataPlane *s = VAR_0; unsigned VAR_1 = s->conf->num_queues; unsigned long VAR_2[BITS_TO_LONGS(VAR_1)]; unsigned VAR_3; memcpy(VAR_2, s->batch_notify_vqs, sizeof(VAR_2)); memset(s->batch_notify_vqs, 0, sizeof(VAR_2)); for (VAR_3 = 0; VAR_3 < VAR_1; VAR_3 += BITS_PER_LONG) { unsigned long VAR_4 = VAR_2[VAR_3]; while (VAR_4 != 0) { unsigned VAR_5 = VAR_3 + ctzl(VAR_4); VirtQueue *vq = virtio_get_queue(s->vdev, VAR_5); if (virtio_should_notify(s->vdev, vq)) { event_notifier_set(virtio_queue_get_guest_notifier(vq)); } VAR_4 &= VAR_4 - 1; } } }