B
baumann.Pan
hi all,
in the linux kernel code compiler.h
i read
#define likely(x) __builtin_expect(!!(x), 1)
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
#define __builtin_expect(exp,c) (exp)
#endif
what's the meaing of !!(x)?
thanks
baumann@pan
in the linux kernel code compiler.h
i read
#define likely(x) __builtin_expect(!!(x), 1)
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
#define __builtin_expect(exp,c) (exp)
#endif
what's the meaing of !!(x)?
thanks
baumann@pan