diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-12-07 18:08:59 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-12-07 18:08:59 -0500 |
commit | 941edf069e169fec28cd35ca41cbb5b9154df5f9 (patch) | |
tree | 77b83f519b3a5bef8c18b8001ccbb623b5f45518 | |
parent | 64271aaf6b6f166a31fcec24510575a0226230fd (diff) |
Revert "time: prevent the loop in timespec_add_ns() from being optimised away"
(will be included in new mainline anyway)
This reverts commit cc4319890a80190d3290f1e04886d0384969b5f3.
-rw-r--r-- | include/linux/time.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/include/linux/time.h b/include/linux/time.h index 3e8fd9e57e..b04136d60a 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -173,10 +173,6 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns) | |||
173 | { | 173 | { |
174 | ns += a->tv_nsec; | 174 | ns += a->tv_nsec; |
175 | while(unlikely(ns >= NSEC_PER_SEC)) { | 175 | while(unlikely(ns >= NSEC_PER_SEC)) { |
176 | /* The following asm() prevents the compiler from | ||
177 | * optimising this loop into a modulo operation. */ | ||
178 | asm("" : "+r"(ns)); | ||
179 | |||
180 | ns -= NSEC_PER_SEC; | 176 | ns -= NSEC_PER_SEC; |
181 | a->tv_sec++; | 177 | a->tv_sec++; |
182 | } | 178 | } |