| line |
true |
false |
branch |
|
99
|
1 |
0 |
if (buf->len < len)
|
|
238
|
180 |
20 |
for (pri = 0; pri < ETP_NUM_PRI; ++pri)
|
|
250
|
22 |
100 |
if (q->qe[pri])
|
|
266
|
89 |
103 |
if (!q->size)
|
|
271
|
375 |
0 |
for (pri = ETP_NUM_PRI; pri--; )
|
|
275
|
103 |
272 |
if (req)
|
|
277
|
90 |
13 |
if (!(q->qs[pri] = (ETP_REQ *)req->next))
|
|
357
|
58 |
54 |
if (ecb_expect_true (req))
|
|
360
|
0 |
54 |
if (ts.tv_sec == 1) /* no request, but timeout detected, let's quit */
|
|
371
|
54 |
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 |
58 |
if (ecb_expect_false (req->type == ETP_TYPE_QUIT))
|
|
400
|
39 |
18 |
if (!reqq_push (&pool->res_queue, req))
|
|
430
|
18 |
0 |
if (xthread_create (&wrk->tid, etp_proc, (void *)wrk))
|
|
447
|
2 |
153 |
if (ecb_expect_true (etp_nthreads (pool) >= pool->wanted))
|
|
451
|
135 |
18 |
if (ecb_expect_true (0 <= (int)etp_nthreads (pool) + (int)etp_npending (pool) - (int)etp_nreqs (pool)))
|
|
487
|
0 |
35 |
if (maxtime)
|
|
499
|
45 |
35 |
if (ecb_expect_true (req))
|
|
503
|
35 |
10 |
if (!pool->res_queue.size)
|
|
509
|
35 |
45 |
if (ecb_expect_false (!req))
|
|
516
|
5 |
40 |
if (ecb_expect_false (req->type == ETP_TYPE_GROUP && req->size))
|
|
|
3 |
2 |
if (ecb_expect_false (req->type == ETP_TYPE_GROUP && req->size))
|
|
524
|
0 |
42 |
if (ecb_expect_false (res))
|
|
528
|
0 |
42 |
if (ecb_expect_false (maxreqs && !--maxreqs))
|
|
|
0 |
0 |
if (ecb_expect_false (maxreqs && !--maxreqs))
|
|
531
|
0 |
42 |
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 |
65 |
if (ecb_expect_false (req->pri < ETP_PRI_MIN - ETP_PRI_MIN)) req->pri = ETP_PRI_MIN - ETP_PRI_MIN;
|
|
568
|
0 |
65 |
if (ecb_expect_false (req->pri > ETP_PRI_MAX - ETP_PRI_MIN)) req->pri = ETP_PRI_MAX - ETP_PRI_MIN;
|
|
570
|
5 |
60 |
if (ecb_expect_false (req->type == ETP_TYPE_GROUP))
|
|
581
|
5 |
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)
|