Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 authored by Linus Torvalds on 16 August 2014, 16:40:26 UTC
Linux 3.17-rc1
Tip revision: 7d1311b
compiler.h
#ifndef _TOOLS_LINUX_COMPILER_H_
#define _TOOLS_LINUX_COMPILER_H_

#ifndef __always_inline
# define __always_inline	inline __attribute__((always_inline))
#endif

#define __user

#ifndef __attribute_const__
# define __attribute_const__
#endif

#ifndef __maybe_unused
# define __maybe_unused		__attribute__((unused))
#endif

#ifndef __packed
# define __packed		__attribute__((__packed__))
#endif

#ifndef __force
# define __force
#endif

#ifndef __weak
# define __weak			__attribute__((weak))
#endif

#ifndef likely
# define likely(x)		__builtin_expect(!!(x), 1)
#endif

#ifndef unlikely
# define unlikely(x)		__builtin_expect(!!(x), 0)
#endif

#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))

#endif /* _TOOLS_LINUX_COMPILER_H */
back to top