Import the likely() compat macro.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
This commit is contained in:
Konstantin Belousov 2013-03-05 09:07:01 +00:00
parent fa0fbaece3
commit 214bb83805

View File

@ -228,6 +228,7 @@ typedef void irqreturn_t;
#define IRQ_NONE /* nothing */
#define unlikely(x) __builtin_expect(!!(x), 0)
#define likely(x) __builtin_expect((x), 0)
#define container_of(ptr, type, member) ({ \
__typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})