aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2007-08-19 20:19:44 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:48:17 -0400
commit6168b96c07d8d40f83622cfb488ca27e4178a603 (patch)
tree408cac4cea814262be6909d9e359c242dc590b17 /net/dccp
parent8fb8354af9b92ce3bd41083995f1fe26024d0959 (diff)
[DCCP]: Nuke the timeval helpers now that we fully converted to ktime_t
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/dccp.h39
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
405static inline suseconds_t timeval_usecs(const struct timeval *tv)
406{
407 return tv->tv_sec * USEC_PER_SEC + tv->tv_usec;
408}
409
410static 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
423static 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
433static 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
445extern int dccp_sysctl_init(void); 406extern int dccp_sysctl_init(void);
446extern void dccp_sysctl_exit(void); 407extern void dccp_sysctl_exit(void);