using "!!" in "c"
- From: markryde@xxxxxxxxx
- Date: 18 Jan 2006 01:28:23 -0800
Hello,
I saw in some open source projects a use of "!!" in "C" code;
for example:
in some header file
#define event_pending(v) \
(!!(v)->vcpu_info->evtchn_upcall_pending & \
!(v)->vcpu_info->evtchn_upcall_mask)
whereas evtchn_upcall_pending is of type unsigned char
(and also evtchn_upcall_mask is of type unsigned char).
What does "!!" operator do in this case ? Any ideas?
MR
.
- Follow-Ups:
- Re: using "!!" in "c"
- From: Emmanuel Delahaye
- Re: using "!!" in "c"
- From: Mike Wahler
- Re: using "!!" in "c"
- From: pemo
- Re: using "!!" in "c"
- From: pete
- Re: using "!!" in "c"
- From: Zara
- Re: using "!!" in "c"
- From: ragunath.cr@xxxxxxxxx
- Re: using "!!" in "c"
- Prev by Date: reading TCP header
- Next by Date: Re: using "!!" in "c"
- Previous by thread: reading TCP header
- Next by thread: Re: using "!!" in "c"
- Index(es):