aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/event.h
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-06-19 16:48:34 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-06-19 16:48:34 +0000
commit77dcac7bd01a41a49abd7d774d2f407a3f06c9c1 (patch)
tree2a06434ed7ecde244970f8e88ccff7fdc25662ab /xen/include/xen/event.h
parent60b6be9ccdd46b8cbddf1d96a89b4e6239248ee9 (diff)
downloadxen-77dcac7bd01a41a49abd7d774d2f407a3f06c9c1.tar.gz
xen-77dcac7bd01a41a49abd7d774d2f407a3f06c9c1.tar.bz2
xen-77dcac7bd01a41a49abd7d774d2f407a3f06c9c1.zip
bitkeeper revision 1.983 (40d46e62pNngJp16CZ2sqZwmplr_Kw)
More cleanups.
Diffstat (limited to 'xen/include/xen/event.h')
-rw-r--r--xen/include/xen/event.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h
index 95c72010a1..0393215493 100644
--- a/xen/include/xen/event.h
+++ b/xen/include/xen/event.h
@@ -18,10 +18,12 @@
*/
/* Schedule an asynchronous callback for the specified domain. */
-static inline void guest_async_callback(struct domain *p)
+static inline void guest_async_callback(struct domain *d)
{
- if ( !domain_unblock(p) && p->has_cpu && (p != current) )
- smp_send_event_check_mask(1 << p->processor);
+ int running = test_bit(DF_RUNNING, &d->flags);
+ domain_unblock(d);
+ if ( running )
+ smp_send_event_check_cpu(d->processor);
}
/*
@@ -31,43 +33,43 @@ static inline void guest_async_callback(struct domain *p)
* may require explicit memory barriers.
*/
-static inline void evtchn_set_pending(struct domain *p, int port)
+static inline void evtchn_set_pending(struct domain *d, int port)
{
- shared_info_t *s = p->shared_info;
+ shared_info_t *s = d->shared_info;
if ( !test_and_set_bit(port, &s->evtchn_pending[0]) &&
!test_bit (port, &s->evtchn_mask[0]) &&
!test_and_set_bit(port>>5, &s->evtchn_pending_sel) )
{
/* The VCPU pending flag must be set /after/ update to evtchn-pend. */
s->vcpu_data[0].evtchn_upcall_pending = 1;
- guest_async_callback(p);
+ guest_async_callback(d);
}
}
-static inline void evtchn_set_exception(struct domain *p, int port)
+static inline void evtchn_set_exception(struct domain *d, int port)
{
- if ( !test_and_set_bit(port, &p->shared_info->evtchn_exception[0]) )
- evtchn_set_pending(p, port);
+ if ( !test_and_set_bit(port, &d->shared_info->evtchn_exception[0]) )
+ evtchn_set_pending(d, port);
}
/*
* send_guest_virq:
- * @p: Domain to which virtual IRQ should be sent
+ * @d: Domain to which virtual IRQ should be sent
* @virq: Virtual IRQ number (VIRQ_*)
*/
-static inline void send_guest_virq(struct domain *p, int virq)
+static inline void send_guest_virq(struct domain *d, int virq)
{
- evtchn_set_pending(p, p->virq_to_evtchn[virq]);
+ evtchn_set_pending(d, d->virq_to_evtchn[virq]);
}
/*
* send_guest_pirq:
- * @p: Domain to which physical IRQ should be sent
+ * @d: Domain to which physical IRQ should be sent
* @pirq: Physical IRQ number
*/
-static inline void send_guest_pirq(struct domain *p, int pirq)
+static inline void send_guest_pirq(struct domain *d, int pirq)
{
- evtchn_set_pending(p, p->pirq_to_evtchn[pirq]);
+ evtchn_set_pending(d, d->pirq_to_evtchn[pirq]);
}
#define event_pending(_d) \