|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 03/12] xen/events: introduce test_and_set_mask
From: Wei Liu <wei.liu2@xxxxxxxxxx>
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
---
drivers/xen/events.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index af61813..057a033 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -351,6 +351,12 @@ static inline int test_evtchn(int port)
return sync_test_bit(port, BM(&s->evtchn_pending[0]));
}
+static inline int test_and_set_mask(int port)
+{
+ struct shared_info *s = HYPERVISOR_shared_info;
+ return sync_test_and_set_bit(port, BM(&s->evtchn_mask[0]));
+}
+
/**
* notify_remote_via_irq - send event to remote end of event channel via irq
@@ -1519,7 +1525,7 @@ static int retrigger_evtchn(int evtchn)
if (!VALID_EVTCHN(evtchn))
return 0;
- masked = sync_test_and_set_bit(evtchn, BM(s->evtchn_mask));
+ masked = test_and_set_mask(evtchn);
sync_set_bit(evtchn, BM(s->evtchn_pending));
if (!masked)
unmask_evtchn(evtchn);
--
1.7.2.5
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |