| 634 | } |
| 635 | |
| 636 | MicroThread* MtFrame::CreateThread(ThreadStart entry, void *args, bool runable) |
| 637 | { |
| 638 | MtFrame* mtframe = MtFrame::Instance(); |
| 639 | MicroThread* thread = mtframe->AllocThread(); |
| 640 | if (NULL == thread) |
| 641 | { |
| 642 | MTLOG_ERROR("create thread failed"); |
| 643 | return NULL; |
| 644 | } |
| 645 | thread->SetSartFunc(entry, args); |
| 646 | |
| 647 | if (runable) { |
| 648 | mtframe->InsertRunable(thread); |
| 649 | } |
| 650 | |
| 651 | return thread; |
| 652 | } |
| 653 | |
| 654 | int MtFrame::Loop(void* args) |
| 655 | { |
no test coverage detected