gallium: add ALWAYS_INLINE

Used when we want to be sure the compiler inlines a large function into
an inner loop.
This commit is contained in:
Luca Barbieri 2010-08-10 10:26:14 +02:00
parent 5668526c91
commit 6f3c4819ec
1 changed files with 10 additions and 0 deletions

View File

@ -102,6 +102,16 @@ typedef unsigned char boolean;
# endif
#endif
/* Forced function inlining */
#ifndef ALWAYS_INLINE
# ifdef __GNUC__
# define ALWAYS_INLINE inline __attribute__((always_inline))
# elif defined(_MSC_VER)
# define ALWAYS_INLINE __forceinline
# else
# define ALWAYS_INLINE INLINE
# endif
#endif
/* Function visibility */
#ifndef PUBLIC