]> ruderich.org/simon Gitweb - coloredstderr/coloredstderr.git/blobdiff - src/compiler.h
Inline fast part of tracked_fds_find().
[coloredstderr/coloredstderr.git] / src / compiler.h
index 3d92f2fac5f1e05eef2a93f4191e1dd489465df7..9e23e238efa2c30ec52e9be5a20f50b7ef097876 100644 (file)
 #ifndef COMPILER_H
 #define COMPILER_H 1
 
+/* Prevent/force inlining. Used to improve performance. */
+#undef __noinline
+#undef __always_inline
+#ifdef HAVE___ATTRIBUTE__
+# define __noinline      __attribute__((noinline))
+# define __always_inline __attribute__((always_inline))
+#else
+# define __noinline
+# define __always_inline
+#endif
+
 /* Branch prediction information for the compiler. */
 #ifdef HAVE___BUILTIN_EXPECT
 # define likely(x)   __builtin_expect(!!(x), 1)