[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] code question?


  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Jerone Young <jyoung5@xxxxxxxxxx>
  • Date: Thu, 11 Aug 2005 10:55:16 -0500
  • Delivery-date: Thu, 11 Aug 2005 15:56:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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@xxxxxxxxxx
512-838-1157 (T/L: 678-1157)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.