From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>, Oleg Nesterov <oleg@redhat.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
Balbir Singh <balbir@in.ibm.com>,
linux-kernel@vger.kernel.org,
Stanislaw Gruszka <sgruszka@redhat.com>
Subject: [RFC PATCH 3/6] cpu-timers: return true old increase value in timer_settime()
Date: Wed, 9 Dec 2009 10:39:55 +0100 [thread overview]
Message-ID: <1260351598-4203-4-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1260351598-4203-3-git-send-email-sgruszka@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
kernel/posix-cpu-timers.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index 84589e9..4716c8c 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -675,7 +675,7 @@ int posix_cpu_timer_set(struct k_itimer *timer, int flags,
struct itimerspec *new, struct itimerspec *old)
{
struct task_struct *p = timer->it.cpu.task;
- union cpu_time_count old_expires, new_expires, val;
+ union cpu_time_count old_expires, new_expires, old_incr, val;
int ret;
if (unlikely(p == NULL)) {
@@ -706,6 +706,7 @@ int posix_cpu_timer_set(struct k_itimer *timer, int flags,
BUG_ON(!irqs_disabled());
ret = 0;
+ old_incr = timer->it.cpu.incr;
spin_lock(&p->sighand->siglock);
old_expires = timer->it.cpu.expires;
if (unlikely(timer->it.cpu.firing)) {
@@ -821,7 +822,7 @@ int posix_cpu_timer_set(struct k_itimer *timer, int flags,
out:
if (old) {
sample_to_timespec(timer->it_clock,
- timer->it.cpu.incr, &old->it_interval);
+ old_incr, &old->it_interval);
}
return ret;
}
--
1.6.2.5
next prev parent reply other threads:[~2009-12-09 9:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 9:39 [RFC PATCH 0/6] cpu-timers patches Stanislaw Gruszka
2009-12-09 9:39 ` [RFC PATCH 1/6] cpu-timers: simplify RLIMIT_CPU handling Stanislaw Gruszka
2009-12-09 9:39 ` [RFC PATCH 2/6] cpu-timers: cleanup arm_timer() Stanislaw Gruszka
2009-12-09 9:39 ` Stanislaw Gruszka [this message]
2009-12-09 9:39 ` [RFC PATCH 4/6] cpu-timers: change SIGEV_NONE timer handling Stanislaw Gruszka
2009-12-09 9:39 ` [RFC PATCH 5/6] cpu-timers: change arm_timer() locking Stanislaw Gruszka
2009-12-09 9:39 ` [RFC PATCH 6/6] cpu-timers: optimize run_posix_cpu_timers() Stanislaw Gruszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1260351598-4203-4-git-send-email-sgruszka@redhat.com \
--to=sgruszka@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=balbir@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®