event_notifier: remove event_notifier_test

The function is useless (and unused).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Paolo Bonzini 2012-07-05 17:16:23 +02:00 committed by Avi Kivity
parent 2ec10b952b
commit ebe7acea53
2 changed files with 0 additions and 16 deletions

View File

@ -51,18 +51,3 @@ int event_notifier_test_and_clear(EventNotifier *e)
int r = read(e->fd, &value, sizeof(value));
return r == sizeof(value);
}
int event_notifier_test(EventNotifier *e)
{
uint64_t value;
int r = read(e->fd, &value, sizeof(value));
if (r == sizeof(value)) {
/* restore previous value. */
int s = write(e->fd, &value, sizeof(value));
/* never blocks because we use EFD_SEMAPHORE.
* If we didn't we'd get EAGAIN on overflow
* and we'd have to write code to ignore it. */
assert(s == sizeof(value));
}
return r == sizeof(value);
}

View File

@ -24,6 +24,5 @@ void event_notifier_cleanup(EventNotifier *);
int event_notifier_get_fd(EventNotifier *);
int event_notifier_set(EventNotifier *);
int event_notifier_test_and_clear(EventNotifier *);
int event_notifier_test(EventNotifier *);
#endif