Skip to content

Commit dff0fd2

Browse files
author
Kent Overstreet
committed
timers: Split out timer_types.h
Cutting down on sched.h dependencies: this is going to be used in workqueue_types.h in the next patch, so we can kill the sched.h dependency on workqueue.h. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 22c336d commit dff0fd2

File tree

2 files changed

+24
-15
lines changed

2 files changed

+24
-15
lines changed

include/linux/timer.h

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,7 @@
77
#include <linux/stddef.h>
88
#include <linux/debugobjects.h>
99
#include <linux/stringify.h>
10-
11-
struct timer_list {
12-
/*
13-
* All fields that change during normal runtime grouped to the
14-
* same cacheline
15-
*/
16-
struct hlist_node entry;
17-
unsigned long expires;
18-
void (*function)(struct timer_list *);
19-
u32 flags;
20-
21-
#ifdef CONFIG_LOCKDEP
22-
struct lockdep_map lockdep_map;
23-
#endif
24-
};
10+
#include <linux/timer_types.h>
2511

2612
#ifdef CONFIG_LOCKDEP
2713
/*

include/linux/timer_types.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _LINUX_TIMER_TYPES_H
3+
#define _LINUX_TIMER_TYPES_H
4+
5+
#include <linux/lockdep_types.h>
6+
#include <linux/types.h>
7+
8+
struct timer_list {
9+
/*
10+
* All fields that change during normal runtime grouped to the
11+
* same cacheline
12+
*/
13+
struct hlist_node entry;
14+
unsigned long expires;
15+
void (*function)(struct timer_list *);
16+
u32 flags;
17+
18+
#ifdef CONFIG_LOCKDEP
19+
struct lockdep_map lockdep_map;
20+
#endif
21+
};
22+
23+
#endif /* _LINUX_TIMER_TYPES_H */

0 commit comments

Comments
 (0)