Commit 9443868d55a829cd66a2dce24daad84c5f1ca2ed

Nate Rosenblum 2013-03-05T11:29:33

Double-check next timeout when adding events When resuming the system from a suspended state, the ev_timeout field of a scheduled timer event may be in the past. This leads to unexpected behavior when scheduling a short-duration timer event immediately after returning from suspension, because the new event does not land on top of the timeout minheap and so the event loop (blocked on a possibly long-duration timeout) is not notified. This patch checks for this condition and, if it obtains, notifies the event loop.