[ovs-dev] [PATCH 1/2] timer: Remove timer_expired_at() function.

Ben Pfaff blp at nicira.com
Thu May 19 02:52:18 UTC 2011


On Wed, May 18, 2011 at 06:23:29PM -0700, Ethan Jackson wrote:
> >  /* True if 'timer' has expired. */
> >  static inline bool
> >  timer_expired(const struct timer *timer)
> >  {
> > -    return timer_expired_at(timer, time_msec());
> > +    return time_msec() > timer->t;
> >  }
> 
> Looking this over, before this patch it was >= not simply >.  I'm not
> really sure which is correct.  I should probably change it back to >=
> unless anyone has an opinion.

>=.  Otherwise you can end up with 1 ms of 100% CPU.



More information about the dev mailing list