[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macro
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mohit Kalra wrote:
| http://www.kernelnewbies.org/faq/index.php3#dowhile
|
| Regards,
| Mohit Kalra
|
| "It is a capital mistake to theorize before one has data.
| Insensibly one begins to twist facts to suit theories, instead of theories
| to suit facts."
| -SH
|
|
|
| "R!SC"
| <risc54@inwind.it> To:
<kernelnewbies@nl.linux.org>
| Sent by: cc:
| kernelnewbies-bounce@n Subject: macro
| l.linux.org
|
|
| 10/02/02 04:13 PM
|
|
|
|
|
| often i see in the linux kernel source, the macro written in following
| mode:
|
| #define macro_name do{
| asm volatile{....}
| while(0);
|
| why use do while(0) if the number of loop is one?
|
| Thanks
| R!SC
|
|
|
| --
| Kernelnewbies: Help each other learn about the Linux kernel.
| Archive: http://mail.nl.linux.org/kernelnewbies/
| FAQ: http://kernelnewbies.org/faq/
|
I think it is a method of creating a block that will always be grouped
together no matter how certain statements get evaluated.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE9mvcROSid126whWsRAlXIAKCGrfWx/8e8kw8WiS7OD7S0br0smgCgw7mv
TFaI7tag7i/U3pcnW0FBbAA=
=VbhR
-----END PGP SIGNATURE-----
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/
- References:
- Re: macro
- From: "Mohit Kalra" <kmohit@in.ibm.com>