summaryrefslogtreecommitdiffstats
path: root/kernel/time/posix-clock.c
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@gmail.com>2019-11-12 02:26:54 +0100
committerThomas Gleixner <tglx@linutronix.de>2020-01-14 12:20:49 +0100
commit819a95fe3adfc7b558bfd96dd5ac589c4f543fd4 (patch)
tree6ddff882dfe45a2816fccf833faebffa45cd7107 /kernel/time/posix-clock.c
parenttime: Add timens_offsets to be used for tasks in time namespace (diff)
downloadlinux-819a95fe3adfc7b558bfd96dd5ac589c4f543fd4.tar.xz
linux-819a95fe3adfc7b558bfd96dd5ac589c4f543fd4.zip
posix-clocks: Rename the clock_get() callback to clock_get_timespec()
The upcoming support for time namespaces requires to have access to: - The time in a task's time namespace for sys_clock_gettime() - The time in the root name space for common_timer_get() That adds a valid reason to finally implement a separate callback which returns the time in ktime_t format, rather than in (struct timespec). Rename the clock_get() callback to clock_get_timespec() as a preparation for introducing clock_get_ktime(). Suggested-by: Thomas Gleixner <tglx@linutronix.de> Co-developed-by: Dmitry Safonov <dima@arista.com> Signed-off-by: Andrei Vagin <avagin@gmail.com> Signed-off-by: Dmitry Safonov <dima@arista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20191112012724.250792-6-dima@arista.com
Diffstat (limited to 'kernel/time/posix-clock.c')
-rw-r--r--kernel/time/posix-clock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/time/posix-clock.c b/kernel/time/posix-clock.c
index 200fb2d3be99..77c0c2370b6d 100644
--- a/kernel/time/posix-clock.c
+++ b/kernel/time/posix-clock.c
@@ -310,8 +310,8 @@ out:
}
const struct k_clock clock_posix_dynamic = {
- .clock_getres = pc_clock_getres,
- .clock_set = pc_clock_settime,
- .clock_get = pc_clock_gettime,
- .clock_adj = pc_clock_adjtime,
+ .clock_getres = pc_clock_getres,
+ .clock_set = pc_clock_settime,
+ .clock_get_timespec = pc_clock_gettime,
+ .clock_adj = pc_clock_adjtime,
};