| 786 | } |
| 787 | |
| 788 | inline 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 | |
| 802 | inline void MtFrame::RemoveSleep(MicroThread* thread) |
| 803 | { |
no test coverage detected