lkml.org 
[lkml]   [2004]   [Jun]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 29 Jun 2004 01:45:06 -0700
FromGeorge Anzinger <>
SubjectRe: [PATCH] Bugfix for CLOCK_REALTIME absolute timer.
Andrew Morton wrote:
> George Anzinger <george@mvista.com> wrote:
> 
>>Ok, I think this does it.
> 
> 
> patching file kernel/posix-timers.c
> Hunk #10 FAILED at 529.
> Hunk #11 succeeded at 776 (offset 18 lines).
> Hunk #13 succeeded at 863 (offset 18 lines).
> Hunk #15 succeeded at 977 (offset 18 lines).
> Hunk #17 succeeded at 1062 (offset 18 lines).
> Hunk #19 succeeded at 1435 (offset 18 lines).
> 1 out of 20 hunks FAILED -- saving rejects to file kernel/posix-timers.c.rej
> 
> I fixed that up - please test next -mm, check that it all works?

Will do.
> 
>  +	do {
>  +		do {
>  +			seq = read_seqbegin(&xtime_lock);
>  +			new_wall_to =	wall_to_monotonic;
>  +		} while (read_seqretry(&xtime_lock, seq));
>  +
>  +		spin_lock_irq(&abs_list.lock);
>  +		if (list_empty(&cws_list)) {
>  +			spin_unlock_irq(&abs_list.lock);
>  +			break;
>  +		}
>  +		timr = list_entry(cws_list.next, struct k_itimer, 
>  +				   abs_timer_entry);
>  +		
>  +		list_del_init(&timr->abs_timer_entry);
>  +		if (add_clockset_delta(timr, &new_wall_to) &&
>  +		    del_timer(&timr->it_timer))  /* timer run yet? */
>  +			add_timer(&timr->it_timer);
>  +		list_add(&timr->abs_timer_entry, &abs_list.list);
>  +		spin_unlock_irq(&abs_list.lock);
>  +	} while (1);
> 
> nanonit:
> 
> 	for ( ; ; ) {
> 		...
> 	}
> 
> is more readable than
> 
> 	do {
> 		...
> 	} while (1);
> 
> because you can see what it's doing as the eye enters the code...
> 
Noted, thanks.



-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2008