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
This commit is contained in:

committed by
Thomas Gleixner

parent
af993f58d6
commit
819a95fe3a
@@ -657,7 +657,7 @@ static int alarm_clock_getres(const clockid_t which_clock, struct timespec64 *tp
|
||||
}
|
||||
|
||||
/**
|
||||
* alarm_clock_get - posix clock_get interface
|
||||
* alarm_clock_get - posix clock_get_timespec interface
|
||||
* @which_clock: clockid
|
||||
* @tp: timespec to fill.
|
||||
*
|
||||
@@ -837,7 +837,7 @@ static int alarm_timer_nsleep(const clockid_t which_clock, int flags,
|
||||
|
||||
const struct k_clock alarm_clock = {
|
||||
.clock_getres = alarm_clock_getres,
|
||||
.clock_get = alarm_clock_get,
|
||||
.clock_get_timespec = alarm_clock_get,
|
||||
.timer_create = alarm_timer_create,
|
||||
.timer_set = common_timer_set,
|
||||
.timer_del = common_timer_del,
|
||||
|
Reference in New Issue
Block a user