MCPcopy Create free account
hub / github.com/F-Stack/f-stack / GetRootThread

Method GetRootThread

adapter/micro_thread/micro_thread.cpp:685–709  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

683}
684
685MicroThread *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
711void MtFrame::ThreadSchdule()
712{

Callers 2

mt_set_msg_privateFunction · 0.80
mt_get_msg_privateFunction · 0.80

Calls 2

GetTypeMethod · 0.80
GetParentMethod · 0.80

Tested by

no test coverage detected