what's the two !! usage?
baumann.Pan_at_gmail.com
Date: 03/30/05
- Next message: jt: "Re: malloc error on pointer"
- Previous message: Martin Ambuhl: "Re: malloc error on pointer"
- Next in thread: Ben Pfaff: "Re: what's the two !! usage?"
- Reply: Ben Pfaff: "Re: what's the two !! usage?"
- Reply: Peter MacMillan: "Re: what's the two !! usage?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Mar 2005 17:52:48 -0800
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
- Next message: jt: "Re: malloc error on pointer"
- Previous message: Martin Ambuhl: "Re: malloc error on pointer"
- Next in thread: Ben Pfaff: "Re: what's the two !! usage?"
- Reply: Ben Pfaff: "Re: what's the two !! usage?"
- Reply: Peter MacMillan: "Re: what's the two !! usage?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]