[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>
This commit is contained in:
Roman Zippel
2006-03-26 01:38:12 -08:00
committed by Linus Torvalds
parent df869b630d
commit 05cfb614dd
8 changed files with 22 additions and 27 deletions

View File

@@ -45,9 +45,7 @@ struct hrtimer_base;
* @expires: the absolute expiry time in the hrtimers internal
* representation. The time is related to the clock on
* which the timer is based.
* @state: state of the timer
* @function: timer expiry callback function
* @data: argument for the callback function
* @base: pointer to the timer base (per cpu and per clock)
*
* The hrtimer structure must be initialized by init_hrtimer_#CLOCKTYPE()
@@ -55,8 +53,7 @@ struct hrtimer_base;
struct hrtimer {
struct rb_node node;
ktime_t expires;
int (*function)(void *);
void *data;
int (*function)(struct hrtimer *);
struct hrtimer_base *base;
};

View File

@@ -402,6 +402,7 @@ struct signal_struct {
/* ITIMER_REAL timer for the process */
struct hrtimer real_timer;
struct task_struct *tsk;
ktime_t it_real_incr;
/* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */

View File

@@ -96,6 +96,7 @@ static inline void add_timer(struct timer_list *timer)
extern void init_timers(void);
extern void run_local_timers(void);
extern int it_real_fn(void *);
struct hrtimer;
extern int it_real_fn(struct hrtimer *);
#endif