mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
timerqueue: Split out timerqueue_types.h
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>
This commit is contained in:
parent
097691960f
commit
eee51b0ae5
@ -3,7 +3,7 @@
|
||||
#define _LINUX_HRTIMER_TYPES_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/timerqueue.h>
|
||||
#include <linux/timerqueue_types.h>
|
||||
|
||||
struct hrtimer_clock_base;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#define _linux_POSIX_TIMERS_TYPES_H
|
||||
|
||||
#include <linux/mutex_types.h>
|
||||
#include <linux/timerqueue.h>
|
||||
#include <linux/timerqueue_types.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
|
@ -3,18 +3,7 @@
|
||||
#define _LINUX_TIMERQUEUE_H
|
||||
|
||||
#include <linux/rbtree.h>
|
||||
#include <linux/ktime.h>
|
||||
|
||||
|
||||
struct timerqueue_node {
|
||||
struct rb_node node;
|
||||
ktime_t expires;
|
||||
};
|
||||
|
||||
struct timerqueue_head {
|
||||
struct rb_root_cached rb_root;
|
||||
};
|
||||
|
||||
#include <linux/timerqueue_types.h>
|
||||
|
||||
extern bool timerqueue_add(struct timerqueue_head *head,
|
||||
struct timerqueue_node *node);
|
||||
|
17
include/linux/timerqueue_types.h
Normal file
17
include/linux/timerqueue_types.h
Normal file
@ -0,0 +1,17 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _LINUX_TIMERQUEUE_TYPES_H
|
||||
#define _LINUX_TIMERQUEUE_TYPES_H
|
||||
|
||||
#include <linux/rbtree_types.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct timerqueue_node {
|
||||
struct rb_node node;
|
||||
ktime_t expires;
|
||||
};
|
||||
|
||||
struct timerqueue_head {
|
||||
struct rb_root_cached rb_root;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_TIMERQUEUE_TYPES_H */
|
Loading…
Reference in New Issue
Block a user