[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

@ -128,17 +128,16 @@ asmlinkage long sys_getitimer(int which, struct itimerval __user *value)
/*
* The timer is automagically restarted, when interval != 0
*/
int it_real_fn(void *data)
int it_real_fn(struct hrtimer *timer)
{
struct task_struct *tsk = (struct task_struct *) data;
struct signal_struct *sig =
container_of(timer, struct signal_struct, real_timer);
send_group_sig_info(SIGALRM, SEND_SIG_PRIV, tsk);
if (tsk->signal->it_real_incr.tv64 != 0) {
hrtimer_forward(&tsk->signal->real_timer,
tsk->signal->real_timer.base->softirq_time,
tsk->signal->it_real_incr);
send_group_sig_info(SIGALRM, SEND_SIG_PRIV, sig->tsk);
if (sig->it_real_incr.tv64 != 0) {
hrtimer_forward(timer, timer->base->softirq_time,
sig->it_real_incr);
return HRTIMER_RESTART;
}
return HRTIMER_NORESTART;