[ovs-dev] [PATCH 2/4] poll-loop: Introduce cross-platform poll_fd_wait_event().

Gurucharan Shetty shettyg at nicira.com
Thu Feb 6 16:12:31 UTC 2014


This is helpful if we want to wait either on 'fd' for POSIX or
events for Windows.

Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
 lib/poll-loop.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/poll-loop.h b/lib/poll-loop.h
index cbbaf55..aa8891b 100644
--- a/lib/poll-loop.h
+++ b/lib/poll-loop.h
@@ -56,6 +56,8 @@ void poll_fd_wait_at(int fd, HANDLE wevent, short int events, const char *where)
 #else
 #define poll_wait_event(wevent) poll_fd_wait_at(0, wevent, 0, SOURCE_LOCATOR)
 #endif
+#define poll_fd_wait_event(fd, wevent, events)  \
+    poll_fd_wait_at(fd, wevent, events, SOURCE_LOCATOR)
 
 void poll_timer_wait_at(long long int msec, const char *where);
 #define poll_timer_wait(msec) poll_timer_wait_at(msec, SOURCE_LOCATOR)
-- 
1.7.9.5




More information about the dev mailing list