Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91934
b: refs/heads/master
c: cdd04d9
h: refs/heads/master
v: v3
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Apr 21, 2008
1 parent a51fcff commit 0536f22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 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: 633d424bf33dab99e77b36210fbd1b996e7823df
refs/heads/master: cdd04d98f6922f5a7ba52714f077140d42bc67c9
17 changes: 6 additions & 11 deletions trunk/net/dccp/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,24 @@ struct {
struct kfifo *fifo;
spinlock_t lock;
wait_queue_head_t wait;
struct timeval tstart;
struct timespec tstart;
} dccpw;

static void printl(const char *fmt, ...)
{
va_list args;
int len;
struct timeval now;
struct timespec now;
char tbuf[256];

va_start(args, fmt);
do_gettimeofday(&now);
getnstimeofday(&now);

now.tv_sec -= dccpw.tstart.tv_sec;
now.tv_usec -= dccpw.tstart.tv_usec;
if (now.tv_usec < 0) {
--now.tv_sec;
now.tv_usec += 1000000;
}
now = timespec_sub(now, dccpw.tstart);

len = sprintf(tbuf, "%lu.%06lu ",
(unsigned long) now.tv_sec,
(unsigned long) now.tv_usec);
(unsigned long) now.tv_nsec / NSEC_PER_USEC);
len += vscnprintf(tbuf+len, sizeof(tbuf)-len, fmt, args);
va_end(args);

Expand Down Expand Up @@ -119,7 +114,7 @@ static struct jprobe dccp_send_probe = {
static int dccpprobe_open(struct inode *inode, struct file *file)
{
kfifo_reset(dccpw.fifo);
do_gettimeofday(&dccpw.tstart);
getnstimeofday(&dccpw.tstart);
return 0;
}

Expand Down

0 comments on commit 0536f22

Please sign in to comment.