#pragma once

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

#ifndef INLINE
#  ifdef _MSC_VER
#    define INLINE __inline
#  else
#    define INLINE inline
#  endif
#endif

#ifndef THREAD_LOCAL
#  ifdef _MSC_VER
#    define THREAD_LOCAL __declspec( thread )
#  else
#    define THREAD_LOCAL __thread
#  endif
#endif
