aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/event.h
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-10-17 15:15:17 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-10-17 15:15:17 +0100
commit3afe806f6fc892fe7ba31e2d7f2059d0ac1766da (patch)
treec6e3bec49aadd1687bbfc92c8756f24525440862 /xen/include/xen/event.h
parentdcd2f1cf1fb61742d669a959f552c774f36eb832 (diff)
downloadxen-3afe806f6fc892fe7ba31e2d7f2059d0ac1766da.tar.gz
xen-3afe806f6fc892fe7ba31e2d7f2059d0ac1766da.tar.bz2
xen-3afe806f6fc892fe7ba31e2d7f2059d0ac1766da.zip
Make the event-channel pending and mask arrays consist of
longs. Thi sensures appropriate alignment for architectures that require it, and also allows us to naturally support up to 4096 event channels per 64-bit guest. Moved 'n_vcpu' field from shared_info to start_info. Really it ought to disappear altogether as the info can be derived from xenstore. Fix a weird bug in XendDomainInfo where 'vcpus' information for a domain defaults to floating point value 1.0 rather than integer 1. This looks like a Python bug to me, but in any case it is 'fixed' by explicitly converting the default value to an integer. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/xen/event.h')
-rw-r--r--xen/include/xen/event.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h
index 8f527b0c83..e8a8bc2b5b 100644
--- a/xen/include/xen/event.h
+++ b/xen/include/xen/event.h
@@ -28,10 +28,11 @@ static inline void evtchn_set_pending(struct vcpu *v, int port)
shared_info_t *s = d->shared_info;
/* These four operations must happen in strict order. */
- if ( !test_and_set_bit(port, &s->evtchn_pending[0]) &&
- !test_bit (port, &s->evtchn_mask[0]) &&
- !test_and_set_bit(port>>5, &v->vcpu_info->evtchn_pending_sel) &&
- !test_and_set_bit(0, &v->vcpu_info->evtchn_upcall_pending) )
+ if ( !test_and_set_bit(port, &s->evtchn_pending[0]) &&
+ !test_bit (port, &s->evtchn_mask[0]) &&
+ !test_and_set_bit(port / BITS_PER_LONG,
+ &v->vcpu_info->evtchn_pending_sel) &&
+ !test_and_set_bit(0, &v->vcpu_info->evtchn_upcall_pending) )
{
evtchn_notify(v);
}