1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_HRTIMER_TYPES_H
3 #define _LINUX_HRTIMER_TYPES_H
5 #include <linux/types.h>
6 #include <linux/timerqueue_types.h>
8 struct hrtimer_clock_base
;
11 * Return values for the callback function
13 enum hrtimer_restart
{
14 HRTIMER_NORESTART
, /* Timer is not restarted */
15 HRTIMER_RESTART
, /* Timer must be restarted */
19 * struct hrtimer - the basic hrtimer structure
20 * @node: timerqueue node, which also manages node.expires,
21 * the absolute expiry time in the hrtimers internal
22 * representation. The time is related to the clock on
23 * which the timer is based. Is setup by adding
24 * slack to the _softexpires value. For non range timers
25 * identical to _softexpires.
26 * @_softexpires: the absolute earliest expiry time of the hrtimer.
27 * The time which was given as expiry time when the timer
29 * @function: timer expiry callback function
30 * @base: pointer to the timer base (per cpu and per clock)
31 * @state: state information (See bit values above)
32 * @is_rel: Set if the timer was armed relative
33 * @is_soft: Set if hrtimer will be expired in soft interrupt context.
34 * @is_hard: Set if hrtimer will be expired in hard interrupt context
37 * The hrtimer structure must be initialized by hrtimer_init()
40 struct timerqueue_node node
;
42 enum hrtimer_restart (*function
)(struct hrtimer
*);
43 struct hrtimer_clock_base
*base
;
50 #endif /* _LINUX_HRTIMER_TYPES_H */