Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87064
b: refs/heads/master
c: 38332cb
h: refs/heads/master
v: v3
  • Loading branch information
Segher Boessenkool authored and Thomas Gleixner committed Mar 9, 2008
1 parent 23bbe5d commit ad10112
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e48af19f56eb47a1f908ee8f16df9d246f955b21
refs/heads/master: 38332cb98772f5ea757e6486bed7ed0381cb5f98
4 changes: 4 additions & 0 deletions trunk/include/linux/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ static inline void timespec_add_ns(struct timespec *a, u64 ns)
{
ns += a->tv_nsec;
while(unlikely(ns >= NSEC_PER_SEC)) {
/* The following asm() prevents the compiler from
* optimising this loop into a modulo operation. */
asm("" : "+r"(ns));

ns -= NSEC_PER_SEC;
a->tv_sec++;
}
Expand Down

0 comments on commit ad10112

Please sign in to comment.