diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2008-09-22 14:42:49 -0700 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-09-24 15:45:48 +0200 |
commit | 717835d94d3e3d343a302df0a3cb9405887c3e2a (patch) | |
tree | 52da10bec8843d3869049440776d91cde95b04a4 /kernel/posix-timers.c | |
parent | 36b2f046000b358b62b9d116cb10a2b1c5be5cbf (diff) | |
download | op-kernel-dev-717835d94d3e3d343a302df0a3cb9405887c3e2a.zip op-kernel-dev-717835d94d3e3d343a302df0a3cb9405887c3e2a.tar.gz |
posix-timers: move the initialization of timer->sigq from send to create path
posix_timer_event() always populates timer->sigq with the same numbers,
move this code into sys_timer_create().
Note that with this patch we can kill it_sigev_signo and it_sigev_value.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: mingo@elte.hu
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r-- | kernel/posix-timers.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index 5b76190..c459b29 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c @@ -312,11 +312,6 @@ int posix_timer_event(struct k_itimer *timr, int si_private) */ timr->sigq->info.si_sys_private = si_private; - timr->sigq->info.si_signo = timr->it_sigev_signo; - timr->sigq->info.si_code = SI_TIMER; - timr->sigq->info.si_tid = timr->it_id; - timr->sigq->info.si_value = timr->it_sigev_value; - shared = !(timr->it_sigev_notify & SIGEV_THREAD_ID); ret = send_sigqueue(timr->sigq, timr->it_process, shared); /* If we failed to send the signal the timer stops. */ @@ -537,6 +532,11 @@ sys_timer_create(const clockid_t which_clock, get_task_struct(process); } + new_timer->sigq->info.si_code = SI_TIMER; + new_timer->sigq->info.si_tid = new_timer->it_id; + new_timer->sigq->info.si_signo = new_timer->it_sigev_signo; + new_timer->sigq->info.si_value = new_timer->it_sigev_value; + spin_lock_irq(¤t->sighand->siglock); new_timer->it_process = process; list_add(&new_timer->list, ¤t->signal->posix_timers); |