On Thu, Jan 14, 2010 at 10:44 AM, Ulrich Windl <[email protected]> wrote: > On 13 Jan 2010 at 18:56, Erez Zilber wrote: > > Hi! > > I wonder whether the #define could be replaced with an inline function. > The readability would be much better, and the code should be more or > less the same, unless you need special macro processing. For code size > we could even try to make it a "normal" routine (i.e. not inlined). The > performance might suffer a little bit, however. > > Also: With "-O3" gcc usually automatically inlines short "static" > (locally defined?) routines. >
We can make it inline instead of using a macro. I used macros because this is what we had till now, and I didn't want to change that. The only problem with inline functions is that it's up to the compiler to decide if the function will be inlined. This may affect performance in some cases. Erez
-- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/open-iscsi?hl=en.
