diff options
| author | Roman Zippel <zippel@linux-m68k.org> | 2006-03-26 04:38:12 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:57:03 -0500 |
| commit | 05cfb614ddbf3181540ce09d44d96486f8ba8d6a (patch) | |
| tree | aafed98638557a4643141d906fbb2406f0764a94 /include/linux | |
| parent | df869b630d9d9131c10cf073fb61646048874b2f (diff) | |
[PATCH] hrtimers: remove data field
The nanosleep cleanup allows to remove the data field of hrtimer. The
callback function can use container_of() to get it's own data. Since the
hrtimer structure is anyway embedded in other structures, this adds no
overhead.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/hrtimer.h | 5 | ||||
| -rw-r--r-- | include/linux/sched.h | 1 | ||||
| -rw-r--r-- | include/linux/timer.h | 3 |
3 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index f57cc7bd7008..93830158348e 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -45,9 +45,7 @@ struct hrtimer_base; | |||
| 45 | * @expires: the absolute expiry time in the hrtimers internal | 45 | * @expires: the absolute expiry time in the hrtimers internal |
| 46 | * representation. The time is related to the clock on | 46 | * representation. The time is related to the clock on |
| 47 | * which the timer is based. | 47 | * which the timer is based. |
| 48 | * @state: state of the timer | ||
| 49 | * @function: timer expiry callback function | 48 | * @function: timer expiry callback function |
| 50 | * @data: argument for the callback function | ||
| 51 | * @base: pointer to the timer base (per cpu and per clock) | 49 | * @base: pointer to the timer base (per cpu and per clock) |
| 52 | * | 50 | * |
| 53 | * The hrtimer structure must be initialized by init_hrtimer_#CLOCKTYPE() | 51 | * The hrtimer structure must be initialized by init_hrtimer_#CLOCKTYPE() |
| @@ -55,8 +53,7 @@ struct hrtimer_base; | |||
| 55 | struct hrtimer { | 53 | struct hrtimer { |
| 56 | struct rb_node node; | 54 | struct rb_node node; |
| 57 | ktime_t expires; | 55 | ktime_t expires; |
| 58 | int (*function)(void *); | 56 | int (*function)(struct hrtimer *); |
| 59 | void *data; | ||
| 60 | struct hrtimer_base *base; | 57 | struct hrtimer_base *base; |
| 61 | }; | 58 | }; |
| 62 | 59 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index e0054c1b9a09..036d14d2bf90 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -402,6 +402,7 @@ struct signal_struct { | |||
| 402 | 402 | ||
| 403 | /* ITIMER_REAL timer for the process */ | 403 | /* ITIMER_REAL timer for the process */ |
| 404 | struct hrtimer real_timer; | 404 | struct hrtimer real_timer; |
| 405 | struct task_struct *tsk; | ||
| 405 | ktime_t it_real_incr; | 406 | ktime_t it_real_incr; |
| 406 | 407 | ||
| 407 | /* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */ | 408 | /* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */ |
diff --git a/include/linux/timer.h b/include/linux/timer.h index ee5a09e806e8..b5caabca553c 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
| @@ -96,6 +96,7 @@ static inline void add_timer(struct timer_list *timer) | |||
| 96 | 96 | ||
| 97 | extern void init_timers(void); | 97 | extern void init_timers(void); |
| 98 | extern void run_local_timers(void); | 98 | extern void run_local_timers(void); |
| 99 | extern int it_real_fn(void *); | 99 | struct hrtimer; |
| 100 | extern int it_real_fn(struct hrtimer *); | ||
| 100 | 101 | ||
| 101 | #endif | 102 | #endif |
