Re: fake loop

From: Mike Frisch (mfrisch@saturn.tlug.org)
Date: Fri Aug 03 2001 - 11:25:39 EST


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/



This archive was generated by hypermail 2b29 : Tue Aug 07 2001 - 21:00:28 EST