#include <linux/math64.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/time.h>
#include <linux/timex.h>
#include <asm/param.h>
Go to the source code of this file.
|
#define | SH_DIV(NOM, DEN, LSH) |
|
#define | LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ |
|
#define | TICK_NSEC ((NSEC_PER_SEC+HZ/2)/HZ) |
|
#define | TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) |
|
#define | __jiffy_data __attribute__((section(".data"))) |
|
#define | time_after(a, b) |
|
#define | time_before(a, b) time_after(b,a) |
|
#define | time_after_eq(a, b) |
|
#define | time_before_eq(a, b) time_after_eq(b,a) |
|
#define | time_in_range(a, b, c) |
|
#define | time_in_range_open(a, b, c) |
|
#define | time_after64(a, b) |
|
#define | time_before64(a, b) time_after64(b,a) |
|
#define | time_after_eq64(a, b) |
|
#define | time_before_eq64(a, b) time_after_eq64(b,a) |
|
#define | time_is_before_jiffies(a) time_after(jiffies, a) |
|
#define | time_is_after_jiffies(a) time_before(jiffies, a) |
|
#define | time_is_before_eq_jiffies(a) time_after_eq(jiffies, a) |
|
#define | time_is_after_eq_jiffies(a) time_before_eq(jiffies, a) |
|
#define | INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ)) |
|
#define | MAX_JIFFY_OFFSET ((LONG_MAX >> 1)-1) |
|
#define | SEC_JIFFIE_SC (31 - SHIFT_HZ) |
|
#define | SEC_JIFFIE_SC (32 - SHIFT_HZ) |
|
#define | NSEC_JIFFIE_SC (SEC_JIFFIE_SC + 29) |
|
#define | USEC_JIFFIE_SC (SEC_JIFFIE_SC + 19) |
|
#define | SEC_CONVERSION |
|
#define | NSEC_CONVERSION |
|
#define | USEC_CONVERSION |
|
#define | USEC_ROUND (u64)(((u64)1 << USEC_JIFFIE_SC) - 1) |
|
#define | MAX_SEC_IN_JIFFIES (long)((u64)((u64)MAX_JIFFY_OFFSET * TICK_NSEC) / NSEC_PER_SEC) |
|
#define | TIMESTAMP_SIZE 30 |
|
#define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ)) |
#define MAX_JIFFY_OFFSET ((LONG_MAX >> 1)-1) |
#define SEC_JIFFIE_SC (31 - SHIFT_HZ) |
#define SEC_JIFFIE_SC (32 - SHIFT_HZ) |
#define SH_DIV |
( |
|
NOM, |
|
|
|
DEN, |
|
|
|
LSH |
|
) |
| |
Value:( (((NOM) / (
DEN)) << (LSH)) \
+ ((((NOM) % (
DEN)) << (LSH)) + (
DEN) / 2) / (
DEN))
Definition at line 51 of file jiffies.h.
#define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) |
#define time_after |
( |
|
a, |
|
|
|
b |
|
) |
| |
Value:
typecheck(
unsigned long,
b) && \
Definition at line 101 of file jiffies.h.
#define time_after64 |
( |
|
a, |
|
|
|
b |
|
) |
| |
#define time_after_eq |
( |
|
a, |
|
|
|
b |
|
) |
| |
Value:
typecheck(
unsigned long,
b) && \
Definition at line 107 of file jiffies.h.
#define time_after_eq64 |
( |
|
a, |
|
|
|
b |
|
) |
| |
#define time_in_range |
( |
|
a, |
|
|
|
b, |
|
|
|
c |
|
) |
| |
#define time_in_range_open |
( |
|
a, |
|
|
|
b, |
|
|
|
c |
|
) |
| |
#define TIMESTAMP_SIZE 30 |
unsigned long clock_t_to_jiffies |
( |
unsigned long |
x | ) |
|
u64 jiffies_64_to_clock_t |
( |
u64 |
x | ) |
|
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.
int register_refined_jiffies |
( |
long |
clock_tick_rate | ) |
|