[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:
committed by
Linus Torvalds
parent
df869b630d
commit
05cfb614dd
@ -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;
|
||||
|
Reference in New Issue
Block a user