From patchwork Thu Apr 5 10:59:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v3,07/10] Drop unused qemu_eventfd Date: Thu, 05 Apr 2012 00:59:14 -0000 From: Jan Kiszka X-Patchwork-Id: 151093 Message-Id: <548d2410d10e66e2c61e5c1f215798adff204e14.1333623555.git.jan.kiszka@siemens.com> To: Anthony Liguori , qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini The only user was the main loop which is now relying on QemuEvent. Signed-off-by: Jan Kiszka --- oslib-posix.c | 31 ------------------------------- qemu-common.h | 1 - 2 files changed, 0 insertions(+), 32 deletions(-) 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 #endif -#ifdef CONFIG_EVENTFD -#include -#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