1234567891011121314151617181920212223242526272829303132333435 |
- #ifndef __LINUX_COMPILER_H
- #define __LINUX_COMPILER_H
- #include "../compiler_types.h"
- #define likely(x) __builtin_expect(!!(x), 1)
- #define unlikely(x) __builtin_expect(!!(x), 0)
- #define likely_notrace(x) likely(x)
- #define unlikely_notrace(x) unlikely(x)
- #ifndef __ASSEMBLY__
- static inline void *offset_to_ptr(const int *off)
- {
- return (void *)((unsigned long)off + *off);
- }
- #endif
- #define is_signed_type(type) (((type)(-1)) < (__force type)1)
- #define is_unsigned_type(type) (!is_signed_type(type))
- #ifndef __UNIQUE_ID
- #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__)
- #endif
- #endif
|