Re: [patch 00/19] mutex subsystem, -V11

From: Linus Torvalds
Date: Thu Jan 05 2006 - 11:47:56 EST




On Thu, 5 Jan 2006, David Howells wrote:
>
> This sort of thing is done by the compiler when it does tail-calling.

Yes. And it's nice even when unconditional branches are effectively free,
because it can avoid an unnecessary cache miss just to fetch the
unnecessary branch (which very much _can_ happen, since the failure
function will sleep).

Of course, the thing to look out for is to never get the call-return stack
messed up, but this kind of regular tail-call doesn't have that issue.

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