From: chris@basementcode.com (Christopher Harvey)
To: kernelnewbies@lists.kernelnewbies.org
Subject: what does it use two "!!"
Date: Mon, 01 Apr 2013 09:47:19 -0400 [thread overview]
Message-ID: <87y5d2cqhk.fsf@basementcode.com> (raw)
In-Reply-To: <1364800386.40120.YahooMailClassic@web92107.mail.cnh.yahoo.com>
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 = 000000 then
!a = 1
!! = 0
basically it means if a is non-zero then make a = exactly 1, else leave
it at zero.
> 2> is there some MSN group to study linux kernel or discuss it ?
don't know, but it would be ironic.
> Thanks and Best Regards
>
> Ben Wu
>
> MSN:crayben at yahoo.cn
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2013-04-01 13:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-01 7:13 what does it use two "!!" Ben Wu
2013-04-01 7:18 ` anish singh
2013-04-01 13:47 ` Christopher Harvey [this message]
2013-04-01 23:36 ` Jonathan Neuschäfer
-- strict thread matches above, loose matches on Subject: below --
2013-04-01 4:12 pci_alloc_consistent doubt Avinash Patil
2013-04-01 7:10 ` what does it use two "!!" Ben Wu
2013-04-01 9:37 ` Valdis.Kletnieks at vt.edu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y5d2cqhk.fsf@basementcode.com \
--to=chris@basementcode.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).