All of lore.kernel.org
 help / color / mirror / Atom feed
* code question?
@ 2005-08-11 15:55 Jerone Young
  2005-08-11 16:18 ` Anthony Liguori
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jerone Young @ 2005-08-11 15:55 UTC (permalink / raw)
  To: xen-devel

Doing some janitorial (you cleaning the flooded toilets and such) work
today. I have come across this line of code that really I'm not sure
what the intent was..in xen/include/sched.h

#define hypercall_preempt_check() (unlikely(            \
        softirq_pending(smp_processor_id()) |           \
        (!!current->vcpu_info->evtchn_upcall_pending &  \
          !current->vcpu_info->evtchn_upcall_mask)      \
    ))

the part where we have !!current->vcpu_info_evtchen_upcall pending
should this be..should the "!! just be "!"?

And if so shouldn't this just be changed to 

#define hypercall_preempt_check() (unlikely( \
	softirq_pending(smp_processor_id()) |           \
	(!(current->vcpu_info->evtchn_upcall_pending & \
	  current->vcpu_info->evtchn_upcall_mask)) \
	))
	

In a lot of the code in Xen we are using the "!" operator with bitwise
operations..this is one of those examples.



-- 
Jerone Young
IBM Linux Technology Center
jyoung5@us.ibm.com
512-838-1157 (T/L: 678-1157)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-08-11 18:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-11 15:55 code question? Jerone Young
2005-08-11 16:18 ` Anthony Liguori
2005-08-11 16:22 ` Keir Fraser
2005-08-11 18:14   ` Tim Newsham
2005-08-11 16:55 ` David Hopwood
2005-08-11 17:03 ` M.A. Williamson
2005-08-11 17:23   ` Keir Fraser
2005-08-11 18:53     ` David Hopwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.