| 768 | } |
| 769 | |
| 770 | int MtFrame::KqueueGetTimeout() |
| 771 | { |
| 772 | utime64_t now = GetLastClock(); |
| 773 | MicroThread* thread = dynamic_cast<MicroThread*>(_sleeplist.HeapTop()); |
| 774 | if (!thread) |
| 775 | { |
| 776 | return 10; //default 10ms epollwait |
| 777 | } |
| 778 | else if (thread->GetWakeupTime() < now) |
| 779 | { |
| 780 | return 0; |
| 781 | } |
| 782 | else |
| 783 | { |
| 784 | return (int)(thread->GetWakeupTime() - now); |
| 785 | } |
| 786 | } |
| 787 | |
| 788 | inline void MtFrame::InsertSleep(MicroThread* thread) |
| 789 | { |
nothing calls this directly
no test coverage detected