diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-11-22 00:42:55 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-11-22 00:50:47 -0500 |
commit | 22291ae84a029d65334d1a90b67b5031f45cd540 (patch) | |
tree | ab9fefe205577324915545b21535fcccbff89f48 /include/linux/jiffies.h | |
parent | 74cb92203293a8d5b16b078389f6b3dba5300e89 (diff) |
Update bcachefs sources to 9e7ae5219c bcachefs: Make write points more dynamic
Diffstat (limited to 'include/linux/jiffies.h')
-rw-r--r-- | include/linux/jiffies.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 00abaee1..e0dadcf0 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -70,7 +70,7 @@ extern int register_refined_jiffies(long clock_tick_rate); /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) -static inline u64 local_clock(void) +static inline u64 sched_clock(void) { struct timespec ts; @@ -79,6 +79,11 @@ static inline u64 local_clock(void) return ((s64) ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec; } +static inline u64 local_clock(void) +{ + return sched_clock(); +} + extern unsigned long clock_t_to_jiffies(unsigned long x); extern u64 jiffies_64_to_clock_t(u64 x); extern u64 nsec_to_clock_t(u64 x); @@ -87,7 +92,7 @@ extern unsigned long nsecs_to_jiffies(u64 n); static inline u64 get_jiffies_64(void) { - return nsecs_to_jiffies64(local_clock()); + return nsecs_to_jiffies64(sched_clock()); } #define jiffies_64 get_jiffies_64() |