Re: [PATCH 2/2] posix-cpu-timers: fix wrong timer initialization

2013-04-29 Thread KOSAKI Motohiro
>>> @@ -749,7 +756,13 @@ static int posix_cpu_timer_set(struct k_itimer *timer, >>> int flags, >>> } >>> >>> if (new_expires.sched != 0 && !(flags & TIMER_ABSTIME)) { >>> - cpu_time_add(timer->it_clock, &new_expires, val); >>> + union cpu_time_count now; >>> + >>> +

Re: [PATCH 2/2] posix-cpu-timers: fix wrong timer initialization

2013-04-29 Thread KOSAKI Motohiro
(4/29/13 6:36 AM), Peter Zijlstra wrote: > On Mon, Apr 29, 2013 at 02:26:02AM -0400, kosaki.motoh...@gmail.com wrote: >> From: KOSAKI Motohiro >> >> Currently glibc's rt/tst-cputimer1 testcase is spradically fail because >> a timer created by timer_create() may faire earlier than an argument. >> >

Re: [PATCH 2/2] posix-cpu-timers: fix wrong timer initialization

2013-04-29 Thread Peter Zijlstra
On Mon, Apr 29, 2013 at 02:26:02AM -0400, kosaki.motoh...@gmail.com wrote: > From: KOSAKI Motohiro > > Currently glibc's rt/tst-cputimer1 testcase is spradically fail because > a timer created by timer_create() may faire earlier than an argument. > > There are two faults. 1) cpu_timer_sample_gro

[PATCH 2/2] posix-cpu-timers: fix wrong timer initialization

2013-04-28 Thread kosaki . motohiro
From: KOSAKI Motohiro Currently glibc's rt/tst-cputimer1 testcase is spradically fail because a timer created by timer_create() may faire earlier than an argument. There are two faults. 1) cpu_timer_sample_group() adds task_delta_exec(current). But it is definity silly idea especially when multi