Re: File system query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23 June 2013 17:18, Dibyayan Chakraborty <dib.coolguy@xxxxxxxxx> wrote:
> Hi,
> I came by a really weird macro code in linux/jbd.h which is
>
> BUFFER_TRACE(bh,info)  do{} while(0).
>
> Please explain the necessity of this.

I'm not familiar with that specific code, but it looks like a "no op"
macro. Maybe the definition is the to ensure backwards or forward
compatibility for the code that calls the macro , but now it doesn't
do anything.

For the reason why there is a while(0), instead of just no code there,
take a look at this:

http://kernelnewbies.org/FAQ/DoWhile0


Hope this helps.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux