aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/itimer.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-03-26 04:38:12 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:57:03 -0500
commit05cfb614ddbf3181540ce09d44d96486f8ba8d6a (patch)
treeaafed98638557a4643141d906fbb2406f0764a94 /kernel/itimer.c
parentdf869b630d9d9131c10cf073fb61646048874b2f (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 'kernel/itimer.c')
-rw-r--r--kernel/itimer.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/kernel/itimer.c b/kernel/itimer.c
index af2ec6b4392c..204ed7939e75 100644
--- a/kernel/itimer.c
+++ b/kernel/itimer.c
@@ -128,17 +128,16 @@ asmlinkage long sys_getitimer(int which, struct itimerval __user *value)
128/* 128/*
129 * The timer is automagically restarted, when interval != 0 129 * The timer is automagically restarted, when interval != 0
130 */ 130 */
131int it_real_fn(void *data) 131int it_real_fn(struct hrtimer *timer)
132{ 132{
133 struct task_struct *tsk = (struct task_struct *) data; 133 struct signal_struct *sig =
134 container_of(timer, struct signal_struct, real_timer);
134 135
135 send_group_sig_info(SIGALRM, SEND_SIG_PRIV, tsk); 136 send_group_sig_info(SIGALRM, SEND_SIG_PRIV, sig->tsk);
136
137 if (tsk->signal->it_real_incr.tv64 != 0) {
138 hrtimer_forward(&tsk->signal->real_timer,
139 tsk->signal->real_timer.base->softirq_time,
140 tsk->signal->it_real_incr);
141 137
138 if (sig->it_real_incr.tv64 != 0) {
139 hrtimer_forward(timer, timer->base->softirq_time,
140 sig->it_real_incr);
142 return HRTIMER_RESTART; 141 return HRTIMER_RESTART;
143 } 142 }
144 return HRTIMER_NORESTART; 143 return HRTIMER_NORESTART;