diff options
-rw-r--r-- | net/dccp/dccp.h | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 6fbe293bb271..ddacc23be5e8 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -402,45 +402,6 @@ extern int dccp_insert_option(struct sock *sk, struct sk_buff *skb, | |||
402 | unsigned char option, | 402 | unsigned char option, |
403 | const void *value, unsigned char len); | 403 | const void *value, unsigned char len); |
404 | 404 | ||
405 | static inline suseconds_t timeval_usecs(const struct timeval *tv) | ||
406 | { | ||
407 | return tv->tv_sec * USEC_PER_SEC + tv->tv_usec; | ||
408 | } | ||
409 | |||
410 | static inline suseconds_t timeval_delta(const struct timeval *large, | ||
411 | const struct timeval *small) | ||
412 | { | ||
413 | time_t secs = large->tv_sec - small->tv_sec; | ||
414 | suseconds_t usecs = large->tv_usec - small->tv_usec; | ||
415 | |||
416 | if (usecs < 0) { | ||
417 | secs--; | ||
418 | usecs += USEC_PER_SEC; | ||
419 | } | ||
420 | return secs * USEC_PER_SEC + usecs; | ||
421 | } | ||
422 | |||
423 | static inline void timeval_add_usecs(struct timeval *tv, | ||
424 | const suseconds_t usecs) | ||
425 | { | ||
426 | tv->tv_usec += usecs; | ||
427 | while (tv->tv_usec >= USEC_PER_SEC) { | ||
428 | tv->tv_sec++; | ||
429 | tv->tv_usec -= USEC_PER_SEC; | ||
430 | } | ||
431 | } | ||
432 | |||
433 | static inline void timeval_sub_usecs(struct timeval *tv, | ||
434 | const suseconds_t usecs) | ||
435 | { | ||
436 | tv->tv_usec -= usecs; | ||
437 | while (tv->tv_usec < 0) { | ||
438 | tv->tv_sec--; | ||
439 | tv->tv_usec += USEC_PER_SEC; | ||
440 | } | ||
441 | DCCP_BUG_ON(tv->tv_sec < 0); | ||
442 | } | ||
443 | |||
444 | #ifdef CONFIG_SYSCTL | 405 | #ifdef CONFIG_SYSCTL |
445 | extern int dccp_sysctl_init(void); | 406 | extern int dccp_sysctl_init(void); |
446 | extern void dccp_sysctl_exit(void); | 407 | extern void dccp_sysctl_exit(void); |