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

Method ThreadSchdule

adapter/micro_thread/micro_thread.cpp:711–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

709}
710
711void MtFrame::ThreadSchdule()
712{
713 MicroThread* thread = NULL;
714 MtFrame* mtframe = MtFrame::Instance();
715
716 if (mtframe->_runlist.empty())
717 {
718 thread = mtframe->DaemonThread();
719 }
720 else
721 {
722 thread = mtframe->_runlist.front();
723 mtframe->RemoveRunable(thread);
724 }
725
726 this->SetActiveThread(thread);
727 thread->SetState(MicroThread::RUNNING);
728 thread->RestoreContext();
729}
730
731void MtFrame::CheckExpired()
732{

Callers 3

ScheduleThreadMethod · 0.80
ScheduleSleepMethod · 0.80
SchedulePendMethod · 0.80

Calls 5

SetActiveThreadMethod · 0.95
DaemonThreadMethod · 0.80
RemoveRunableMethod · 0.80
SetStateMethod · 0.80
RestoreContextMethod · 0.80

Tested by

no test coverage detected