Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147420
b: refs/heads/master
c: a92e702
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed May 1, 2009
1 parent 38a1565 commit d287eb0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 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: 6eda5838bc5771578986429cde4a0870e1e5f5e1
refs/heads/master: a92e70237c8abbd1c3241133bf72f2cd07c90eae
18 changes: 11 additions & 7 deletions trunk/Documentation/perf_counter/perf.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@
#define PR_TASK_PERF_COUNTERS_DISABLE 31
#define PR_TASK_PERF_COUNTERS_ENABLE 32

#define rdclock() \
({ \
struct timespec ts; \
\
clock_gettime(CLOCK_MONOTONIC, &ts); \
ts.tv_sec * 1000000000ULL + ts.tv_nsec; \
})
#ifndef NSEC_PER_SEC
# define NSEC_PER_SEC 1000000000ULL
#endif

static inline unsigned long long rdclock(void)
{
struct timespec ts;

clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
}

/*
* Pick up some kernel type conventions:
Expand Down

0 comments on commit d287eb0

Please sign in to comment.