[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: macro
for more info reg. these types of macros refer to kernel newbies FAQ.
http://www.kernelnewbies.org/faq/.
Good explanation from Ben Collins.
Thanks,
sreedhar.
-----Original Message-----
From: K.R. Foley [mailto:kr@cybsft.com]
Sent: Wednesday, October 02, 2002 7:09 PM
To: Mohit Kalra
Cc: R!SC; kernelnewbies@nl.linux.org
Subject: 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/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/
- Follow-Ups:
- Re: macro
- From: "Per Persson" <per.persson@gnosjo.pp.se>