int qed_write_l1_table_sync(BDRVQEDState *s, unsigned int index,

                            unsigned int n)

{

    int ret = -EINPROGRESS;



    async_context_push();



    qed_write_l1_table(s, index, n, qed_sync_cb, &ret);

    while (ret == -EINPROGRESS) {

        qemu_aio_wait();

    }



    async_context_pop();



    return ret;

}

int qed_write_l1_table_sync(BDRVQEDState *s, unsigned int index,

                            unsigned int n)

{

    int ret = -EINPROGRESS;



    async_context_push();



    qed_write_l1_table(s, index, n, qed_sync_cb, &ret);

    while (ret == -EINPROGRESS) {

        qemu_aio_wait();

    }



    async_context_pop();



    return ret;

}

int FUNC_0(BDRVQEDState *VAR_0, unsigned int VAR_1,

                            unsigned int VAR_2)

{

    int VAR_3 = -EINPROGRESS;



    async_context_push();



    qed_write_l1_table(VAR_0, VAR_1, VAR_2, qed_sync_cb, &VAR_3);

    while (VAR_3 == -EINPROGRESS) {

        qemu_aio_wait();

    }



    async_context_pop();



    return VAR_3;

}

int FUNC_0(BDRVQEDState *VAR_0, unsigned int VAR_1,
unsigned int VAR_2)
{ int VAR_3 = -EINPROGRESS; async_context_push(); qed_write_l1_table(VAR_0, VAR_1, VAR_2, qed_sync_cb, &VAR_3); while (VAR_3 == -EINPROGRESS) { qemu_aio_wait(); } async_context_pop(); return VAR_3; }