Branch Coverage

third_party/modest/source/mycore/thread_queue.c
Criterion Covered Total %
branch 82 184 44.5


line true false branch
30 0 145 if(size < 32)
37 0 145 if(queue->nodes == NULL)
42 0 145 if(queue->nodes[queue->nodes_pos] == NULL) {
60 0 144 if(queue == NULL)
63 144 0 if(queue->nodes) {
65 144 144 for (size_t i = 0; i <= queue->nodes_pos; i++) {
106 0 0 if(queue->nodes_length >= queue->nodes_size)
110 0 0 if(queue->nodes_pos >= queue->nodes_pos_size)
113 0 0 if(mythread)
119 0 0 if(tmp) {
126 0 0 if(status)
133 0 0 if(queue->nodes[queue->nodes_pos] == NULL) {
136 0 0 if(queue->nodes[queue->nodes_pos] == NULL) {
137 0 0 if(status)
156 339 1324 if(queue->nodes_uses >= limit) {
160 0 339 if(mythread)
168 0 1324 else if(queue->nodes_length >= queue->nodes_size)
172 0 0 if(queue->nodes_pos >= queue->nodes_pos_size)
175 0 0 if(mythread)
181 0 0 if(tmp) {
188 0 0 if(status)
195 0 0 if(queue->nodes[queue->nodes_pos] == NULL) {
198 0 0 if(queue->nodes[queue->nodes_pos] == NULL) {
199 0 0 if(status)
221 0 22 if(queue->nodes_length >= queue->nodes_size) {
225 0 0 if(mythread)
249 0 7 if(queue_list == NULL)
262 0 7 if(queue_list == NULL)
267 0 7 while(entry)
269 0 0 for (size_t i = 0; i < mythread->entries_length; i++) {
270 0 0 while(entry->thread_param[i].use < entry->queue->nodes_uses)
280 0 0 if(queue_list == NULL)
285 0 0 while(entry)
287 0 0 for (size_t i = 0; i < mythread->entries_length; i++) {
288 0 0 if(entry->thread_param[i].use < entry->queue->nodes_uses)
300 0 26 if(queue_list == NULL)
305 0 26 while(entry)
307 0 0 if(entry->thread_param[thread_id].use < entry->queue->nodes_uses)
322 6 0 if(status)
327 0 6 if(entry == NULL) {
328 0 0 if(status)
337 6 0 if(thread_param_size) {
340 0 6 if(entry->thread_param == NULL) {
343 0 0 if(status)
354 12 6 for(size_t i = 0; i < list_size; i++) {
355 12 0 if(mythread_list[i]) {
356 6 6 if(mythread_list[i]->type == MyTHREAD_TYPE_BATCH)
365 0 6 if(queue_list->first) {
378 12 6 for(size_t i = 0; i < list_size; i++)
379 12 0 if(mythread_list[i])
387 12 6 for(size_t i = 0; i < list_size; i++)
388 12 0 if(mythread_list[i])
394 0 6 if(prev)
397 0 6 if(next)
400 6 0 if(queue_list->first == entry)
403 6 0 if(queue_list->last == entry)
408 12 6 for(size_t i = 0; i < list_size; i++)
409 12 0 if(mythread_list[i])
412 0 6 if(destroy_queue && entry->queue)
0 0 if(destroy_queue && entry->queue)
415 6 0 if(entry->thread_param)
425 145 0 if(entry == NULL)
433 0 6 if(entry == NULL)
436 12 6 for(size_t i = 0; i < entry->thread_param_size; i++) {
437 9 12 while(entry->thread_param[i].use < entry->queue->nodes_uses)
444 0 0 if(entry == NULL)
447 0 0 for(size_t i = 0; i < entry->thread_param_size; i++) {
448 0 0 if(entry->thread_param[i].use < entry->queue->nodes_uses)
457 6 145 if(entry == NULL || mythread == NULL)
0 6 if(entry == NULL || mythread == NULL)
461 6 6 for(size_t from = mythread->id_increase; from <= mythread->entries_length; from++) {
469 6 145 if(entry == NULL || mythread == NULL)
0 6 if(entry == NULL || mythread == NULL)
472 12 6 for(size_t from = mythread->id_increase; from <= mythread->entries_length; from++) {
473 12 0 if (from < entry->thread_param_size)
486 0 54 if(done_count != queue_list->count)
489 12 42 if(opt & MyTHREAD_OPT_STOP)
491 12 0 if(mythread_queue_list_see_for_done_by_thread(mythread, queue_list, thread_id))
500 14 28 else if(opt & MyTHREAD_OPT_QUIT)
502 14 0 if(mythread_queue_list_see_for_done_by_thread(mythread, queue_list, thread_id))
527 6 49 if(mythread->opt & MyTHREAD_OPT_WAIT) {
530 6 6 while (mythread->opt & MyTHREAD_OPT_WAIT)
539 36 55 while(entry)
543 22 14 if(thread_param->use < entry->queue->nodes_uses)
582 6 37 if(mythread->opt & MyTHREAD_OPT_WAIT) {
585 12 6 while (mythread->opt & MyTHREAD_OPT_WAIT) {
595 30 43 while(entry)
599 22 8 if(thread_param->use < entry->queue->nodes_uses)
640 0 0 if(ctx->opt & MyTHREAD_OPT_WAIT) {
641 0 0 while (ctx->opt & MyTHREAD_OPT_WAIT) {
650 0 0 if(mythread->opt & MyTHREAD_OPT_QUIT || ctx->opt & MyTHREAD_OPT_QUIT)
0 0 if(mythread->opt & MyTHREAD_OPT_QUIT || ctx->opt & MyTHREAD_OPT_QUIT)