[lkml]   [2008]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] add time_now_after and other macros which compare with jiffies
> >  > +/* time_now_before_eq(a) return true if now (jiffies) is before or equal to a */
> > > +#define time_now_before_eq(a) time_before_eq(jiffies, a)
> >
> > How about even more obvious names like time_is_past(), time_is_future(),
> > ...?
> Thanks for comment.
> Then how do we name the _eq version? IMHO, the time_now_* is enough.

Why do you even need them. I don't see the point of *any* of these extra
macros as they simply obfuscate code and hide what is actually going on.
The initial macros were added because of the type safety and correct
comparison rules being complex. They have a purpose.

Even if you want these you can use !time_future() if you don't want the
_eq variants. Generally speaking drivers should be using timers not
polled loops, and most of our loops comparing with jiffies want removing.


 \ /
  Last update: 2008-03-09 11:13    [W:0.134 / U:0.400 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site