Re: fake loop

Mike Frisch (mfrisch@saturn.tlug.org)
Fri, 3 Aug 2001 12:25:39 -0400


On Fri, Aug 03, 2001 at 09:57:34AM -0600, Andrey Ilinykh wrote:
> Very often I see in kernel such code as
> do {
> dosomthing();
> } while(0);
>
> or even
>
> #define prepare_to_switch() do { } while(0)
>
> Who can explain me a reason for these fake loops?

This is answered in the Kernelnewbies FAQ @
http://kernelnewbies.org/faq/index.php3#dowhile.xml.
-
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/