| 683 | } |
| 684 | |
| 685 | MicroThread *MtFrame::GetRootThread() |
| 686 | { |
| 687 | if (NULL == _curr_thread) |
| 688 | { |
| 689 | return NULL; |
| 690 | } |
| 691 | |
| 692 | MicroThread::ThreadType type = _curr_thread->GetType(); |
| 693 | MicroThread *thread = _curr_thread; |
| 694 | MicroThread *parent = thread; |
| 695 | |
| 696 | while (MicroThread::SUB_THREAD == type) |
| 697 | { |
| 698 | thread = thread->GetParent(); |
| 699 | if (!thread) |
| 700 | { |
| 701 | break; |
| 702 | } |
| 703 | |
| 704 | type = thread->GetType(); |
| 705 | parent = thread; |
| 706 | } |
| 707 | |
| 708 | return parent; |
| 709 | } |
| 710 | |
| 711 | void MtFrame::ThreadSchdule() |
| 712 | { |
no test coverage detected