Branch Coverage

libeio/etp.c
Criterion Covered Total %
branch 49 72 68.0


line true false branch
99 1 0 if (buf->len < len)
238 180 20 for (pri = 0; pri < ETP_NUM_PRI; ++pri)
250 45 110 if (q->qe[pri])
266 110 135 if (!q->size)
271 540 0 for (pri = ETP_NUM_PRI; pri--; )
275 135 405 if (req)
277 100 35 if (!(q->qs[pri] = (ETP_REQ *)req->next))
357 74 72 if (ecb_expect_true (req))
360 0 72 if (ts.tv_sec == 1) /* no request, but timeout detected, let's quit */
371 72 0 if (pool->idle <= pool->max_idle)
377 0 0 if (!ts.tv_sec)
380 0 0 if (X_COND_TIMEDWAIT (pool->reqwait, pool->reqlock, ts) == ETIMEDOUT)
391 0 74 if (ecb_expect_false (req->type == ETP_TYPE_QUIT))
400 43 30 if (!reqq_push (&pool->res_queue, req))
430 22 0 if (xthread_create (&wrk->tid, etp_proc, (void *)wrk))
447 2 192 if (ecb_expect_true (etp_nthreads (pool) >= pool->wanted))
451 170 22 if (ecb_expect_true (0 <= (int)etp_nthreads (pool) + (int)etp_npending (pool) - (int)etp_nreqs (pool)))
487 0 38 if (maxtime)
499 62 38 if (ecb_expect_true (req))
503 40 22 if (!pool->res_queue.size)
509 38 62 if (ecb_expect_false (!req))
516 6 56 if (ecb_expect_false (req->type == ETP_TYPE_GROUP && req->size))
5 1 if (ecb_expect_false (req->type == ETP_TYPE_GROUP && req->size))
524 0 57 if (ecb_expect_false (res))
528 0 57 if (ecb_expect_false (maxreqs && !--maxreqs))
0 0 if (ecb_expect_false (maxreqs && !--maxreqs))
531 0 57 if (maxtime)
535 0 0 if (etp_tvdiff (&tv_start, &tv_now) >= maxtime)
558 1 3 for (grp = grp->grp_first; grp; grp = grp->grp_next)
567 0 82 if (ecb_expect_false (req->pri < ETP_PRI_MIN - ETP_PRI_MIN)) req->pri = ETP_PRI_MIN - ETP_PRI_MIN;
568 0 82 if (ecb_expect_false (req->pri > ETP_PRI_MAX - ETP_PRI_MIN)) req->pri = ETP_PRI_MAX - ETP_PRI_MIN;
570 6 76 if (ecb_expect_false (req->type == ETP_TYPE_GROUP))
581 6 0 if (!reqq_push (&pool->res_queue, req))
634 10 6 if (pool->wanted < threads)
641 1 0 if (pool->wanted > threads)
644 0 1 while (pool->started > pool->wanted)