Patchwork [v3,07/10] Drop unused qemu_eventfd

login
register
mail settings
Submitter Jan Kiszka
Date April 5, 2012, 10:59 a.m.
Message ID <548d2410d10e66e2c61e5c1f215798adff204e14.1333623555.git.jan.kiszka@siemens.com>
Download mbox | patch
Permalink /patch/151093/
State New
Headers show

Comments

Jan Kiszka - April 5, 2012, 10:59 a.m.
The only user was the main loop which is now relying on QemuEvent.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 oslib-posix.c |   31 -------------------------------
 qemu-common.h |    1 -
 2 files changed, 0 insertions(+), 32 deletions(-)

Patch

diff --git a/oslib-posix.c b/oslib-posix.c
index b6a3c7f..7928a0d 100644
--- a/oslib-posix.c
+++ b/oslib-posix.c
@@ -58,9 +58,6 @@  static int running_on_valgrind = -1;
 #ifdef CONFIG_LINUX
 #include <sys/syscall.h>
 #endif
-#ifdef CONFIG_EVENTFD
-#include <sys/eventfd.h>
-#endif
 
 int qemu_get_thread_id(void)
 {
@@ -177,34 +174,6 @@  int qemu_pipe(int pipefd[2])
     return ret;
 }
 
-/*
- * Creates an eventfd that looks like a pipe and has EFD_CLOEXEC set.
- */
-int qemu_eventfd(int fds[2])
-{
-#ifdef CONFIG_EVENTFD
-    int ret;
-
-    ret = eventfd(0, 0);
-    if (ret >= 0) {
-        fds[0] = ret;
-        fds[1] = dup(ret);
-        if (fds[1] == -1) {
-            close(ret);
-            return -1;
-        }
-        qemu_set_cloexec(ret);
-        qemu_set_cloexec(fds[1]);
-        return 0;
-    }
-    if (errno != ENOSYS) {
-        return -1;
-    }
-#endif
-
-    return qemu_pipe(fds);
-}
-
 int qemu_utimens(const char *path, const struct timespec *times)
 {
     struct timeval tv[2], tv_now;
diff --git a/qemu-common.h b/qemu-common.h
index 4647dd9..732be5d 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -192,7 +192,6 @@  ssize_t qemu_recv_full(int fd, void *buf, size_t count, int flags)
     QEMU_WARN_UNUSED_RESULT;
 
 #ifndef _WIN32
-int qemu_eventfd(int pipefd[2]);
 int qemu_pipe(int pipefd[2]);
 #endif