#include <linux/export.h>
#include <linux/timex.h>
#include <linux/capability.h>
#include <linux/timekeeper_internal.h>
#include <linux/errno.h>
#include <linux/syscalls.h>
#include <linux/security.h>
#include <linux/fs.h>
#include <linux/math64.h>
#include <linux/ptrace.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include "timeconst.h"
Go to the source code of this file.
|
| EXPORT_SYMBOL (sys_tz) |
|
| SYSCALL_DEFINE2 (gettimeofday, struct timeval __user *, tv, struct timezone __user *, tz) |
|
int | do_sys_settimeofday (const struct timespec *tv, const struct timezone *tz) |
|
| SYSCALL_DEFINE2 (settimeofday, struct timeval __user *, tv, struct timezone __user *, tz) |
|
| SYSCALL_DEFINE1 (adjtimex, struct timex __user *, txc_p) |
|
struct timespec | current_fs_time (struct super_block *sb) |
|
| EXPORT_SYMBOL (current_fs_time) |
|
unsigned int | jiffies_to_msecs (const unsigned long j) |
|
| EXPORT_SYMBOL (jiffies_to_msecs) |
|
unsigned int | jiffies_to_usecs (const unsigned long j) |
|
| EXPORT_SYMBOL (jiffies_to_usecs) |
|
struct timespec | timespec_trunc (struct timespec t, unsigned gran) |
|
| EXPORT_SYMBOL (timespec_trunc) |
|
unsigned long | mktime (const unsigned int year0, const unsigned int mon0, const unsigned int day, const unsigned int hour, const unsigned int min, const unsigned int sec) |
|
| EXPORT_SYMBOL (mktime) |
|
void | set_normalized_timespec (struct timespec *ts, time_t sec, s64 nsec) |
|
| EXPORT_SYMBOL (set_normalized_timespec) |
|
struct timespec | ns_to_timespec (const s64 nsec) |
|
| EXPORT_SYMBOL (ns_to_timespec) |
|
struct timeval | ns_to_timeval (const s64 nsec) |
|
| EXPORT_SYMBOL (ns_to_timeval) |
|
unsigned long | msecs_to_jiffies (const unsigned int m) |
|
| EXPORT_SYMBOL (msecs_to_jiffies) |
|
unsigned long | usecs_to_jiffies (const unsigned int u) |
|
| EXPORT_SYMBOL (usecs_to_jiffies) |
|
unsigned long | timespec_to_jiffies (const struct timespec *value) |
|
| EXPORT_SYMBOL (timespec_to_jiffies) |
|
void | jiffies_to_timespec (const unsigned long jiffies, struct timespec *value) |
|
| EXPORT_SYMBOL (jiffies_to_timespec) |
|
unsigned long | timeval_to_jiffies (const struct timeval *value) |
|
| EXPORT_SYMBOL (timeval_to_jiffies) |
|
void | jiffies_to_timeval (const unsigned long jiffies, struct timeval *value) |
|
| EXPORT_SYMBOL (jiffies_to_timeval) |
|
clock_t | jiffies_to_clock_t (unsigned long x) |
|
| EXPORT_SYMBOL (jiffies_to_clock_t) |
|
unsigned long | clock_t_to_jiffies (unsigned long x) |
|
| EXPORT_SYMBOL (clock_t_to_jiffies) |
|
u64 | jiffies_64_to_clock_t (u64 x) |
|
| EXPORT_SYMBOL (jiffies_64_to_clock_t) |
|
u64 | nsec_to_clock_t (u64 x) |
|
u64 | nsecs_to_jiffies64 (u64 n) |
|
unsigned long | nsecs_to_jiffies (u64 n) |
|
struct timespec | timespec_add_safe (const struct timespec lhs, const struct timespec rhs) |
|
unsigned long clock_t_to_jiffies |
( |
unsigned long |
x | ) |
|
current_fs_time - Return FS time : Superblock.
Return the current time truncated to the time granularity supported by the fs.
Definition at line 222 of file time.c.
u64 jiffies_64_to_clock_t |
( |
u64 |
x | ) |
|
ns_to_timespec - Convert nanoseconds to timespec : the nanoseconds value to be converted
Returns the timespec representation of the nsec parameter.
Definition at line 377 of file time.c.
ns_to_timeval - Convert nanoseconds to timeval : the nanoseconds value to be converted
Returns the timeval representation of the nsec parameter.
Definition at line 402 of file time.c.
unsigned long nsecs_to_jiffies |
( |
u64 |
n | ) |
|
nsecs_to_jiffies - Convert nsecs in u64 to jiffies
: nsecs in u64
Unlike {m,u}secs_to_jiffies, type of input is not unsigned int but u64. And this doesn't return MAX_JIFFY_OFFSET since this function is designed for scheduler, not for use in device drivers to calculate timeout value.
note: NSEC_PER_SEC = 10^9 = (5^9 * 2^9) = (1953125 * 512) ULLONG_MAX ns = 18446744073.709551615 secs = about 584 years
Definition at line 684 of file time.c.
u64 nsecs_to_jiffies64 |
( |
u64 |
n | ) |
|
nsecs_to_jiffies64 - Convert nsecs in u64 to jiffies64
: nsecs in u64
Unlike {m,u}secs_to_jiffies, type of input is not unsigned int but u64. And this doesn't return MAX_JIFFY_OFFSET since this function is designed for scheduler, not for use in device drivers to calculate timeout value.
note: NSEC_PER_SEC = 10^9 = (5^9 * 2^9) = (1953125 * 512) ULLONG_MAX ns = 18446744073.709551615 secs = about 584 years
Definition at line 654 of file time.c.
set_normalized_timespec - set timespec sec and nsec parts and normalize
: pointer to timespec variable to be set : seconds to set : nanoseconds to set
Set seconds and nanoseconds field of a timespec variable and normalize to the timespec storage format
Note: The tv_nsec part is always in the range of 0 <= tv_nsec < NSEC_PER_SEC For negative values only the tv_sec field is negative !
Definition at line 349 of file time.c.
timespec_trunc - Truncate timespec to a granularity : Timespec : Granularity in ns.
Truncate a timespec to a granularity. gran must be smaller than a second. Always rounds down.
This function should be only used for timestamps returned by current_kernel_time() or CURRENT_TIME, not with do_gettimeofday() because it doesn't handle the better resolution of the latter.
Definition at line 279 of file time.c.