9d7020d9f198b3eb611ce6217b655e9cd184f227
[openembedded.git] /
1 Index: linux-2.6.24/include/linux/time.h
2 ===================================================================
3 --- a/include/linux/time.h
4 +++ b/include/linux/time.h
5 @@ -172,6 +172,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
6  {
7         ns += a->tv_nsec;
8         while(unlikely(ns >= NSEC_PER_SEC)) {
9 +               /* The following asm() prevents the compiler from
10 +                * optimising this loop into a modulo operation.  */
11 +               asm("" : "+r"(ns));
12 +
13                 ns -= NSEC_PER_SEC;
14                 a->tv_sec++;
15         }