| 525 | } |
| 526 | |
| 527 | static void |
| 528 | thread_msg_handle(struct thread_data *t) |
| 529 | { |
| 530 | for ( ; ; ) { |
| 531 | struct thread_msg_req *req; |
| 532 | struct thread_msg_rsp *rsp; |
| 533 | |
| 534 | req = thread_msg_recv(t->msgq_req); |
| 535 | if (req == NULL) |
| 536 | break; |
| 537 | |
| 538 | switch (req->type) { |
| 539 | case THREAD_REQ_PIPELINE_ENABLE: |
| 540 | rsp = thread_msg_handle_pipeline_enable(t, req); |
| 541 | break; |
| 542 | |
| 543 | case THREAD_REQ_PIPELINE_DISABLE: |
| 544 | rsp = thread_msg_handle_pipeline_disable(t, req); |
| 545 | break; |
| 546 | |
| 547 | default: |
| 548 | rsp = (struct thread_msg_rsp *) req; |
| 549 | rsp->status = -1; |
| 550 | } |
| 551 | |
| 552 | thread_msg_send(t->msgq_rsp, rsp); |
| 553 | } |
| 554 | } |
| 555 | |
| 556 | /** |
| 557 | * Main thread & data plane threads: message passing |
no test coverage detected