what does it use two !!

2013-04-01 Thread Ben Wu
Dear All: 1 I found some placeuse two !!, what's means     if(button-gpio != INVALID_GPIO)         state = !!((gpio_get_value(button-gpio) ? 1 : 0) ^ button-active_low);     else         state = !!button-adc_state; 2 is there some MSN group to study linux kernel or discuss it ? Thanks and

Re: what does it use two !!

2013-04-01 Thread anish singh
!! is generally used to make the return bool value. You can use kernelnewbies and linux kernel mailing list. On Mon, Apr 1, 2013 at 12:43 PM, Ben Wu cray...@yahoo.cn wrote: Dear All: 1 I found some placeuse two !!, what's means if(button-gpio != INVALID_GPIO) state =

what does it use two !!

2013-04-01 Thread Ben Wu
Dear All: 1 I found some placeuse two !!, what's means     if(button-gpio != INVALID_GPIO)         state = !!((gpio_get_value(button-gpio) ? 1 : 0) ^ button-active_low);     else         state = !!button-adc_state; 2 is there some MSN group to study linux kernel or discuss it ? Thanks and Best

Re: what does it use two !!

2013-04-01 Thread Valdis . Kletnieks
On Mon, 01 Apr 2013 15:10:46 +0800, Ben Wu said: 1 I found some placeuse two !!, what's means     if(button-gpio != INVALID_GPIO)         state = !!((gpio_get_value(button-gpio) ? 1 : 0) ^ button-active_low);     else Gaah. That line of code fell out of the ugly tree and hit every branch on

Re: what does it use two !!

2013-04-01 Thread Christopher Harvey
Ben Wu writes: Dear All: 1 I found some placeuse two !!, what's means if(button-gpio != INVALID_GPIO) state = !!((gpio_get_value(button-gpio) ? 1 : 0) ^ button-active_low); else state = !!button-adc_state; if a = 1010011 then !a = 0 and !!a = 1 if a = 00 then !a = 1 !! = 0

Re: what does it use two !!

2013-04-01 Thread Jonathan Neuschäfer
On Mon, Apr 01, 2013 at 03:13:06PM +0800, Ben Wu wrote: 2 is there some MSN group to study linux kernel or discuss it ? MSN:cray...@yahoo.cn You seem to have a strange notion of MSN. I guess you don't mean Microsoft Network (which really is what MSN means much of the time), but e-mail. If you