http://defect.opensolaris.org/bz/show_bug.cgi?id=11784
--- Comment #9 from Anurag S. Maskey <Anurag.Maskey at Sun.COM> 2009-10-07 15:29:09 UTC --- (In reply to comment #8) > > nextalarm = e->event_time - now; > > if (nextalarm > 0) > > (void) alarm(nextalarm) > > This makes sense; but we need to be sure we don't lose that next pending > event. > How does it get handled if we don't schedule another alarm? We will pull it > off and process it (enqueue it on the event queue?) right here? In the above code snippet, we don't set the alarm if the alarm is scheduled to go off within this second. When this alarm does go off, nwamd_event_enqueue_expired_events() is called, which moves expired events from timed event queue to the event queue being processed by the event handler thread. While moving the events from the timed event queue (stored in time order), if we encounter an unexpired event, we set the alarm for the time remaining for that unexpired event. So, the event we are enqueuing in nwamd_event_enqueue_timed() will ultimately get its alarm when it becomes the oldest unexpired event. -- Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
