All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: Andrew Morton <akpm@osdl.org>
Cc: boris.hu@intel.com, drepper@redhat.com, adam.li@intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Bugfix for CLOCK_REALTIME absolute timer.
Date: Tue, 29 Jun 2004 01:45:06 -0700	[thread overview]
Message-ID: <40E12C12.9040207@mvista.com> (raw)
In-Reply-To: <20040628215748.4ea128bc.akpm@osdl.org>

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


  reply	other threads:[~2004-06-29  8:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-03  9:56 [PATCH] One possible bugfix for CLOCK_REALTIME timer Hu, Boris
2004-06-04  0:36 ` George Anzinger
2004-06-28 21:59 ` [PATCH] Bugfix for CLOCK_REALTIME absolute timer George Anzinger
2004-06-28 22:17   ` Andrew Morton
2004-06-28 22:55     ` George Anzinger
2004-06-29  4:48 ` George Anzinger
2004-06-29  4:57   ` Andrew Morton
2004-06-29  8:45     ` George Anzinger [this message]
2004-06-30 19:13     ` George Anzinger

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=40E12C12.9040207@mvista.com \
    --to=george@mvista.com \
    --cc=adam.li@intel.com \
    --cc=akpm@osdl.org \
    --cc=boris.hu@intel.com \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.