Messages in this thread | | | Date | Mon, 15 Dec 2003 16:04:20 +0100 | From | Jörn Engel <> | Subject | Re: [patch] Re: Problem with exiting threads under NPTL |
| |
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 - 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/
| |