static void nbd_coroutine_start(NbdClientSession *s,

   struct nbd_request *request)

{

    /* Poor man semaphore.  The free_sema is locked when no other request

     * can be accepted, and unlocked after receiving one reply.  */

    if (s->in_flight >= MAX_NBD_REQUESTS - 1) {

        qemu_co_mutex_lock(&s->free_sema);

        assert(s->in_flight < MAX_NBD_REQUESTS);

    }

    s->in_flight++;



    /* s->recv_coroutine[i] is set as soon as we get the send_lock.  */

}

static void nbd_coroutine_start(NbdClientSession *s,

   struct nbd_request *request)

{

    



    if (s->in_flight >= MAX_NBD_REQUESTS - 1) {

        qemu_co_mutex_lock(&s->free_sema);

        assert(s->in_flight < MAX_NBD_REQUESTS);

    }

    s->in_flight++;



    

}

    if (s->in_flight >= MAX_NBD_REQUESTS - 1) {         qemu_co_mutex_lock(&s->free_sema);
static void FUNC_0(NbdClientSession *VAR_0,

   struct nbd_request *VAR_1)

{

    



    if (VAR_0->in_flight >= MAX_NBD_REQUESTS - 1) {

        qemu_co_mutex_lock(&VAR_0->free_sema);

        assert(VAR_0->in_flight < MAX_NBD_REQUESTS);

    }

    VAR_0->in_flight++;



    

}

static void FUNC_0(NbdClientSession *VAR_0,
struct nbd_request *VAR_1)
{ if (VAR_0->in_flight >= MAX_NBD_REQUESTS - 1) { qemu_co_mutex_lock(&VAR_0->free_sema); assert(VAR_0->in_flight < MAX_NBD_REQUESTS); } VAR_0->in_flight++; }