Re: macro or inline

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

 



On 8/23/2010 4:09 PM, Parmenides wrote:
Hi,

In kernel, some codes implemented by macro while the others by inline
function.  I wonder how to determine in what situation to use one,
whereas in what situation to use the other.


Inlining functions have benefits when debugging and type checking. Macro's do not. Macro's are guaranteed to be substituted, while
inline function are at the mercy of the optimizing compiler.

Thanks.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[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