Inline fast part of tracked_fds_find().

This commit is contained in:
Simon Ruderich
2013-06-10 06:08:35 +02:00
parent 048bd6f9e7
commit 0a2617527c
3 changed files with 27 additions and 0 deletions

View File

@@ -20,6 +20,17 @@
#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)