ia64/xen-unstable

view xen/include/asm-x86/event.h @ 10099:3d3e5a3008f6

Check `global' property of the arch specific virqs.
Signed-off-by Kevin Tian <Kevin.tian@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu May 18 16:19:18 2006 +0100 (2006-05-18)
parents 4c8311699685
children ddc25d4ebf60
line source
1 /******************************************************************************
2 * event.h
3 *
4 * A nice interface for passing asynchronous events to guest OSes.
5 * (architecture-dependent part)
6 *
7 */
9 #ifndef __ASM_EVENT_H__
10 #define __ASM_EVENT_H__
12 static inline void evtchn_notify(struct vcpu *v)
13 {
14 /*
15 * NB1. 'vcpu_flags' and 'processor' must be checked /after/ update of
16 * pending flag. These values may fluctuate (after all, we hold no
17 * locks) but the key insight is that each change will cause
18 * evtchn_upcall_pending to be polled.
19 *
20 * NB2. We save VCPUF_running across the unblock to avoid a needless
21 * IPI for domains that we IPI'd to unblock.
22 */
23 int running = test_bit(_VCPUF_running, &v->vcpu_flags);
24 vcpu_unblock(v);
25 if ( running )
26 smp_send_event_check_cpu(v->processor);
27 }
29 /* Note: Bitwise operations result in fast code with no branches. */
30 #define event_pending(v) \
31 (!!(v)->vcpu_info->evtchn_upcall_pending & \
32 !(v)->vcpu_info->evtchn_upcall_mask)
34 /* No arch specific virq definition now. Default to global. */
35 static inline int arch_virq_is_global(int virq)
36 {
37 return 1;
38 }
40 #endif