Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234569
b: refs/heads/master
c: fbad1ea
h: refs/heads/master
i:
  234567: 92e5dd7
v: v3
  • Loading branch information
Torben Hohn authored and Thomas Gleixner committed Jan 31, 2011
1 parent 2e19cf5 commit 441fac0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 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: 871cf1e5f2a17702f58539a3af8b18fc8666ad4c
refs/heads/master: fbad1ea94159a71bc0f68b00e57ae803606af9fb
17 changes: 0 additions & 17 deletions trunk/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,23 +674,6 @@ unsigned long nsecs_to_jiffies(u64 n)
#endif
}

#if (BITS_PER_LONG < 64)
u64 get_jiffies_64(void)
{
unsigned long seq;
u64 ret;

do {
seq = read_seqbegin(&xtime_lock);
ret = jiffies_64;
} while (read_seqretry(&xtime_lock, seq));
return ret;
}
EXPORT_SYMBOL(get_jiffies_64);
#endif

EXPORT_SYMBOL(jiffies);

/*
* Add two timespec values and do a safety check for overflow.
* It's assumed that both values are valid (>= 0)
Expand Down
18 changes: 18 additions & 0 deletions trunk/kernel/time/jiffies.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
************************************************************************/
#include <linux/clocksource.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/init.h>

/* The Jiffies based clocksource is the lowest common
Expand Down Expand Up @@ -64,6 +65,23 @@ struct clocksource clocksource_jiffies = {
.shift = JIFFIES_SHIFT,
};

#if (BITS_PER_LONG < 64)
u64 get_jiffies_64(void)
{
unsigned long seq;
u64 ret;

do {
seq = read_seqbegin(&xtime_lock);
ret = jiffies_64;
} while (read_seqretry(&xtime_lock, seq));
return ret;
}
EXPORT_SYMBOL(get_jiffies_64);
#endif

EXPORT_SYMBOL(jiffies);

static int __init init_jiffies_clocksource(void)
{
return clocksource_register(&clocksource_jiffies);
Expand Down

0 comments on commit 441fac0

Please sign in to comment.