mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
eee51b0ae5
Trimming down sched.h dependencies: timerqueue_types can include just rbtree_types.h instead of pulling in rbtree.h. Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
50 lines
1.5 KiB
C
50 lines
1.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_HRTIMER_TYPES_H
|
|
#define _LINUX_HRTIMER_TYPES_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/timerqueue_types.h>
|
|
|
|
struct hrtimer_clock_base;
|
|
|
|
/*
|
|
* Return values for the callback function
|
|
*/
|
|
enum hrtimer_restart {
|
|
HRTIMER_NORESTART, /* Timer is not restarted */
|
|
HRTIMER_RESTART, /* Timer must be restarted */
|
|
};
|
|
|
|
/**
|
|
* struct hrtimer - the basic hrtimer structure
|
|
* @node: timerqueue node, which also manages node.expires,
|
|
* the absolute expiry time in the hrtimers internal
|
|
* representation. The time is related to the clock on
|
|
* which the timer is based. Is setup by adding
|
|
* slack to the _softexpires value. For non range timers
|
|
* identical to _softexpires.
|
|
* @_softexpires: the absolute earliest expiry time of the hrtimer.
|
|
* The time which was given as expiry time when the timer
|
|
* was armed.
|
|
* @function: timer expiry callback function
|
|
* @base: pointer to the timer base (per cpu and per clock)
|
|
* @state: state information (See bit values above)
|
|
* @is_rel: Set if the timer was armed relative
|
|
* @is_soft: Set if hrtimer will be expired in soft interrupt context.
|
|
* @is_hard: Set if hrtimer will be expired in hard interrupt context
|
|
* even on RT.
|
|
*
|
|
* The hrtimer structure must be initialized by hrtimer_init()
|
|
*/
|
|
struct hrtimer {
|
|
struct timerqueue_node node;
|
|
ktime_t _softexpires;
|
|
enum hrtimer_restart (*function)(struct hrtimer *);
|
|
struct hrtimer_clock_base *base;
|
|
u8 state;
|
|
u8 is_rel;
|
|
u8 is_soft;
|
|
u8 is_hard;
|
|
};
|
|
|
|
#endif /* _LINUX_HRTIMER_TYPES_H */
|