[ovs-dev] [PATCH 1/4] poll-loop: Remove unused arguments from poll_fd_wait_event().
Gurucharan Shetty
shettyg at nicira.com
Thu Feb 6 16:12:30 UTC 2014
For Windows, WaitForMultipleObjects() does not make use of
file descriptors. So there is no need of passing it to
poll_fd_wait_event(). Since 'fd' is not used, change the
name to poll_wait_event().
Also, WaitForMultipleObjects() cannot take arguments like
POLLIN, POLLOUT etc. So get rid of that too.
The macro will be reused for a different purpose in an
upcoming commit.
CC: Linda Sun <lsun at vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
lib/daemon-windows.c | 4 ++--
lib/poll-loop.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/daemon-windows.c b/lib/daemon-windows.c
index 60e028b..c59a866 100644
--- a/lib/daemon-windows.c
+++ b/lib/daemon-windows.c
@@ -91,7 +91,7 @@ service_start(int *argcp, char **argvp[])
VLOG_FATAL("Failed to create a event (%s).", msg_buf);
}
- poll_fd_wait_event(0, wevent, POLLIN);
+ poll_wait_event(wevent);
/* Register the control handler. This function is called by the service
* manager to stop the service. */
@@ -190,7 +190,7 @@ should_service_stop(void)
if (service_status.dwCurrentState != SERVICE_RUNNING) {
return true;
} else {
- poll_fd_wait_event(0, wevent, POLLIN);
+ poll_wait_event(wevent);
}
}
return false;
diff --git a/lib/poll-loop.h b/lib/poll-loop.h
index ae4c0c0..cbbaf55 100644
--- a/lib/poll-loop.h
+++ b/lib/poll-loop.h
@@ -54,7 +54,7 @@ void poll_fd_wait_at(int fd, HANDLE wevent, short int events, const char *where)
#ifndef _WIN32
#define poll_fd_wait(fd, events) poll_fd_wait_at(fd, 0, events, SOURCE_LOCATOR)
#else
-#define poll_fd_wait_event(fd, wevent, events) poll_fd_wait_at(fd, wevent, events, SOURCE_LOCATOR)
+#define poll_wait_event(wevent) poll_fd_wait_at(0, wevent, 0, SOURCE_LOCATOR)
#endif
void poll_timer_wait_at(long long int msec, const char *where);
--
1.7.9.5
More information about the dev
mailing list