public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@zip.com.au>
Subject: Re: [patch] Re: Problem with exiting threads under NPTL
Date: Mon, 15 Dec 2003 16:04:20 +0100	[thread overview]
Message-ID: <20031215150420.GD1286@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0312141238460.1478@home.osdl.org>

On Sun, 14 December 2003 12:45:34 -0800, Linus Torvalds wrote:
> 
> Btw, on another note: to avoid the appearance of recursion, I'd prefer a
> 
> 	p = leader;
> 	goto top;
> 
> instead of a "release_task(leader);".
> 
> I realize that the recursion should be just one deep (the leader of the
> leader is itself, and that will stop the thing from going further), but it
> looks trivial to avoid it, and any automated source checking tool would be
> confused by the apparent recursion.

Since you mentioned it - how would you prefer the asct (we need a
better acronym) to detect recursion depth.  Currently, I have those in
a seperate file that should come with the kernel, maybe in
Documentation/recursions or so.  But how about this:

/**
 * RECURSION:	2
 * NAME:	do_recurse
 */
void do_recurse(int recurse)
{
	if (recurse)
		do_recurse(0);
}

Ok, the format is ugly, feel free to pick anything nicer.  But
explicitly stating the recursion depth right where it happens makes
sense to me, as many human readers would like a similar comment
anyway.

Any opinion?

Jörn

-- 
Fools ignore complexity.  Pragmatists suffer it.
Some can avoid it.  Geniuses remove it.
-- Perlis's Programming Proverb #58, SIGPLAN Notices, Sept.  1982

  parent reply	other threads:[~2003-12-15 15:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-14  5:25 Problem with exiting threads under NPTL Petr Vandrovec
2003-12-14 15:02 ` Martin Schlemmer
2003-12-14 19:38 ` [patch] " Ingo Molnar
2003-12-14 20:38   ` Linus Torvalds
2003-12-14 20:45     ` Linus Torvalds
2003-12-14 21:02       ` Ingo Molnar
2003-12-15 15:04       ` Jörn Engel [this message]
2003-12-14 21:06     ` Ingo Molnar
2003-12-14 22:10       ` Linus Torvalds
2003-12-14 22:17         ` Ingo Molnar
2003-12-14 22:32           ` Linus Torvalds
2003-12-15 23:04             ` Roland McGrath
2003-12-14 22:28         ` Ingo Molnar
2003-12-14 22:45           ` Linus Torvalds
2003-12-14 23:08             ` Ingo Molnar
2003-12-15  6:31               ` dan carpenter
2003-12-15 11:43                 ` Ingo Molnar
2003-12-15 13:07                   ` dan carpenter
2003-12-15 15:11                 ` Linus Torvalds
2003-12-15 23:15               ` Roland McGrath
2003-12-15  8:54         ` Arjan van de Ven
2003-12-15 22:55           ` Roland McGrath
2003-12-15 23:06     ` Roland McGrath

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=20031215150420.GD1286@wohnheim.fh-wedel.de \
    --to=joern@wohnheim.fh-wedel.de \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox