summaryrefslogtreecommitdiff
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-10-25 02:09:44 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-25 13:59:16 -0400
commit9799b119c34d7be1ee96d143209cfe5fc543d92a (patch)
treef973e4d166a98c57d7ddb32b15eed16a7382278e /include/linux/sched.h
parentbd9e0153342c51390ec655b4e78eda1aa1c32a84 (diff)
Update bcachefs sources to 0d63ed13ea3d closures: Fix race in closure_sync()v1.3
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 825eea5c..7afb6d54 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -151,6 +151,14 @@ static inline u64 ktime_get_seconds(void)
return ts.tv_sec;
}
+static inline u64 ktime_get_real_ns(void)
+{
+ struct timespec ts;
+
+ clock_gettime(CLOCK_REALTIME, &ts);
+ return timespec_to_ns(&ts);
+}
+
static inline u64 ktime_get_real_seconds(void)
{
struct timespec ts;