2.6.13 - 2.6.14
添加 1
1
2
3
4static inline void setup_timer(struct timer_list * timer,
void (*function)(unsigned long),
unsigned long data)1
2
3
4
5
6
7void init_timer_key(struct timer_list *timer,
const char *name,
struct lock_class_key *key);
// 改为
void init_timer_key(struct timer_list *timer, unsigned int flags,
const char *name, struct lock_class_key *key);
4.1 - 4.2
修改 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19struct timer_list {
......
struct tvec_base *base;
void (*function)(unsigned long);
unsigned long data;
int slack;
......
};
//改为
struct timer_list {
......
void (*function)(unsigned long);
unsigned long data;
u32 flags;
int slack;
......
};1
int slack;
TIMER_PINNED_INITIALIZER
3.
添加init_timer_pinned
## 4.13 - 4.14 添加 1
2
3static inline void timer_setup(struct timer_list *timer,
void (*callback)(struct timer_list *),
unsigned int flags)1
from_timer(var, callback_timer, timer_fieldname)
1
2
3
4
5
6
7
8
9
10
11
12
13
14struct timer_list {
......
void (*function)(unsigned long);
unsigned long data;
u32 flags;
......
};
//改为
struct timer_list {
......
void (*function)(struct timer_list *);
u32 flags;
......
};1
2
3
//改为1
2
3
4
5
6void init_timer_key(struct timer_list *timer, unsigned int flags,
const char *name, struct lock_class_key *key);
// 改为
void init_timer_key(struct timer_list *timer,
void (*func)(struct timer_list *), unsigned int flags,
const char *name, struct lock_class_key *key);