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

Method InsertSleep

adapter/micro_thread/micro_thread.cpp:788–800  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

786}
787
788inline void MtFrame::InsertSleep(MicroThread* thread)
789{
790 ASSERT(!thread->HasFlag(MicroThread::SLEEP_LIST));
791
792 thread->SetFlag(MicroThread::SLEEP_LIST);
793 thread->SetState(MicroThread::SLEEPING);
794 int rc = _sleeplist.HeapPush(thread);
795 if (rc < 0)
796 {
797 MT_ATTR_API(320848, 1); // heap error
798 MTLOG_ERROR("Insert heap failed , rc %d", rc);
799 }
800}
801
802inline void MtFrame::RemoveSleep(MicroThread* thread)
803{

Callers 1

ScheduleSleepMethod · 0.80

Calls 4

HasFlagMethod · 0.80
SetFlagMethod · 0.80
SetStateMethod · 0.80
HeapPushMethod · 0.80

Tested by

no test coverage detected