On Tuesday 23 October 2007 10:28, Jack Morgenstein wrote:
> On Tuesday 23 October 2007 09:23, Gleb Natapov wrote:
> > And where is "#include <linux/compiler.h>" here?
> > 
> Point taken.  However, I checked on Red Hat Enterprise Linux 4 (update 5)
> distributions.  the macro "__always_inline" is not present there (see below).
> They use "inline" or "__inline__" or "__inline" instead.
> 
Correction.

In Kernel space, the __always_inline macro is present (in file 
/lib/modules/<kernel>/source/linux/compiler.h.

However, in user space, the file used is: /usr/include/linux/compiler.h:
#ifndef __LINUX_COMPILER_H
#define __LINUX_COMPILER_H

#define likely(x)       __builtin_expect((x),1)
#define unlikely(x)     __builtin_expect((x),0)

#endif /* __LINUX_COMPILER_H */

The __always_inline macro is not defined for userspace in RHEL4.

Any ideas (other than just including a macro ourselves:
 #ifndef __always_inline
 #define __always_inline inline
 #endif
)?

- Jack
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to