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.
Regards,
Ulrich
[...]
> Here it is:
>
> Added the following code in libiscsi.h:
>
> #define iscsi_log(log_level, dev, dbg_fmt, arg...) \
> do { \
[...]
> } while (0);
[...]------------
Ulrich Windl Klinikum der Universitaet Regensburg
Rechenzentrum DV-med Franz-Josef-Strauss-Allee 11
Tel: +49 941 944-5879 D-93053 Regensburg
FAX: +49 941 944-5882
"The bad PC memory subsystems are really bad." (Linus Torvalds,
19.04.1996)
"Unknown DHCP option 0 length 255" (Windows/NT Server 3.51)
"Oh, it's Visibly BASIC!" -- U. Windl
--
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.