[PATCH v2 08/11] timekeeper: add a couple of the core timekeeper reading helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Denis Plotnikov <dplotnikov@xxxxxxxxxxxxx>
---
 include/linux/timekeeping.h |  3 +++
 kernel/time/timekeeping.c   | 15 +++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index edffe82..092bf5f 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -372,3 +372,6 @@ extern int update_persistent_clock64(struct timespec64 now);
 
 
 #endif
+
+extern const seqcount_t *get_tk_seq(void);
+extern int get_tk_mono_clock_mode(void);
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 1cef214..3f35e52 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -2381,3 +2381,18 @@ void xtime_update(unsigned long ticks)
 	write_sequnlock(&jiffies_lock);
 	update_wall_time();
 }
+
+/*
+ * Helpers forthe core timekeeper reading
+ */
+const seqcount_t *get_tk_seq(void)
+{
+	return &tk_core.seq;
+}
+EXPORT_SYMBOL(get_tk_seq);
+
+int get_tk_mono_clock_mode(void)
+{
+	return tk_core.timekeeper.tkr_mono.clock->archdata.vclock_mode;
+}
+EXPORT_SYMBOL(get_tk_mono_clock_mode);
-- 
2.7.4




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux