Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31331
b: refs/heads/master
c: 4ee303d
h: refs/heads/master
i:
  31329: 4d12813
  31327: 939a67a
v: v3
  • Loading branch information
Shuya MAEDA authored and David S. Miller committed Jun 29, 2006
1 parent 1e31fe1 commit be4b9cf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d3a85337937bb5e3db676eeb4f3bf7f02533b44
refs/heads/master: 4ee303dfeac6451b402e3d8512723d3a0f861857
18 changes: 12 additions & 6 deletions trunk/include/net/pkt_sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,23 @@ psched_tod_diff(int delta_sec, int bound)

#define PSCHED_TADD2(tv, delta, tv_res) \
({ \
int __delta = (tv).tv_usec + (delta); \
(tv_res).tv_sec = (tv).tv_sec; \
if (__delta > USEC_PER_SEC) { (tv_res).tv_sec++; __delta -= USEC_PER_SEC; } \
int __delta = (delta); \
(tv_res) = (tv); \
while(__delta >= USEC_PER_SEC){ \
(tv_res).tv_sec++; \
__delta -= USEC_PER_SEC; \
} \
(tv_res).tv_usec = __delta; \
})

#define PSCHED_TADD(tv, delta) \
({ \
(tv).tv_usec += (delta); \
if ((tv).tv_usec > USEC_PER_SEC) { (tv).tv_sec++; \
(tv).tv_usec -= USEC_PER_SEC; } \
int __delta = (delta); \
while(__delta >= USEC_PER_SEC){ \
(tv).tv_sec++; \
__delta -= USEC_PER_SEC; \
} \
(tv).tv_usec = __delta; \
})

/* Set/check that time is in the "past perfect";
Expand Down

0 comments on commit be4b9cf

Please sign in to comment.