Linux Kernel
3.7.1
|
#include <linux/rbtree.h>
#include <linux/ktime.h>
#include <linux/init.h>
#include <linux/list.h>
#include <linux/wait.h>
#include <linux/percpu.h>
#include <linux/timer.h>
#include <linux/timerqueue.h>
Go to the source code of this file.
Data Structures | |
struct | hrtimer |
struct | hrtimer_sleeper |
struct | hrtimer_clock_base |
struct | hrtimer_cpu_base |
Macros | |
#define | HRTIMER_STATE_INACTIVE 0x00 |
#define | HRTIMER_STATE_ENQUEUED 0x01 |
#define | HRTIMER_STATE_CALLBACK 0x02 |
#define | HRTIMER_STATE_MIGRATE 0x04 |
#define | MONOTONIC_RES_NSEC LOW_RES_NSEC |
#define | KTIME_MONOTONIC_RES KTIME_LOW_RES |
Enumerations | |
enum | hrtimer_mode { HRTIMER_MODE_ABS = 0x0, HRTIMER_MODE_REL = 0x1, HRTIMER_MODE_PINNED = 0x02, HRTIMER_MODE_ABS_PINNED = 0x02, HRTIMER_MODE_REL_PINNED = 0x03 } |
enum | hrtimer_restart { HRTIMER_NORESTART, HRTIMER_RESTART } |
enum | hrtimer_base_type { HRTIMER_BASE_MONOTONIC, HRTIMER_BASE_REALTIME, HRTIMER_BASE_BOOTTIME, HRTIMER_MAX_CLOCK_BASES } |
#define KTIME_MONOTONIC_RES KTIME_LOW_RES |
#define MONOTONIC_RES_NSEC LOW_RES_NSEC |
enum hrtimer_base_type |
enum hrtimer_mode |
enum hrtimer_restart |
DECLARE_PER_CPU | ( | struct tick_device | , |
tick_cpu_device | |||
) |
void hrtimer_init | ( | struct hrtimer * | timer, |
clockid_t | clock_id, | ||
enum hrtimer_mode | mode | ||
) |
void hrtimer_init_sleeper | ( | struct hrtimer_sleeper * | sl, |
struct task_struct * | tsk | ||
) |
long hrtimer_nanosleep_restart | ( | struct restart_block * | restart_block | ) |
Definition at line 249 of file timekeeping.c.
ktime_get_boottime - Returns monotonic time since boot in a ktime
Returns the monotonic time since boot in a ktime
This is similar to CLOCK_MONTONIC/ktime_get, but also includes the time spent in suspend.
Definition at line 1231 of file timekeeping.c.
ktime_get_monotonic_offset() - get wall_to_monotonic in ktime_t format
Definition at line 1369 of file timekeeping.c.
ktime_get_real - get the real (wall-) time in ktime_t format
returns the time in ktime_t format
Definition at line 487 of file timekeeping.c.
int schedule_hrtimeout | ( | ktime_t * | expires, |
const enum hrtimer_mode | mode | ||
) |
schedule_hrtimeout - sleep until timeout : timeout value (ktime_t) : timer mode, HRTIMER_MODE_ABS or HRTIMER_MODE_REL
Make the current task sleep until the given expiry time has elapsed. The routine will return immediately unless the current task state has been set (see set_current_state()).
You can set the task state as follows -
TASK_UNINTERRUPTIBLE - at least time is guaranteed to pass before the routine returns.
TASK_INTERRUPTIBLE - the routine may return early if a signal is delivered to the current task.
The current task state is guaranteed to be TASK_RUNNING when this routine returns.
Returns 0 when the timer has expired otherwise -EINTR
int schedule_hrtimeout_range | ( | ktime_t * | expires, |
unsigned long | delta, | ||
const enum hrtimer_mode | mode | ||
) |
schedule_hrtimeout_range - sleep until timeout : timeout value (ktime_t) : slack in expires timeout (ktime_t) : timer mode, HRTIMER_MODE_ABS or HRTIMER_MODE_REL
Make the current task sleep until the given expiry time has elapsed. The routine will return immediately unless the current task state has been set (see set_current_state()).
The argument gives the kernel the freedom to schedule the actual wakeup to a time that is both power and performance friendly. The kernel give the normal best effort behavior for "@expires+@delta", but may decide to fire the timer earlier, but no earlier than .
You can set the task state as follows -
TASK_UNINTERRUPTIBLE - at least time is guaranteed to pass before the routine returns.
TASK_INTERRUPTIBLE - the routine may return early if a signal is delivered to the current task.
The current task state is guaranteed to be TASK_RUNNING when this routine returns.
Returns 0 when the timer has expired otherwise -EINTR
Definition at line 275 of file timer_list.c.