Although past users only needed to test and clear event notifiers, it is useful to be able to set them too. Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxxxxxxxxxx> --- event_notifier.c | 7 +++++++ event_notifier.h | 1 + 2 files changed, 8 insertions(+) diff --git a/event_notifier.c b/event_notifier.c index 0b82981..006adc5 100644 --- a/event_notifier.c +++ b/event_notifier.c @@ -59,3 +59,10 @@ int event_notifier_test(EventNotifier *e) } return r == sizeof(value); } + +int event_notifier_set(EventNotifier *e) +{ + uint64_t value = 1; + int r = write(e->fd, &value, sizeof(value)); + return r == sizeof(value); +} diff --git a/event_notifier.h b/event_notifier.h index 886222c..46a22f8 100644 --- a/event_notifier.h +++ b/event_notifier.h @@ -24,5 +24,6 @@ void event_notifier_cleanup(EventNotifier *); int event_notifier_get_fd(EventNotifier *); int event_notifier_test_and_clear(EventNotifier *); int event_notifier_test(EventNotifier *); +int event_notifier_set(EventNotifier *); #endif -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html