summaryrefslogtreecommitdiff
path: root/ace/OS_NS_poll.inl
diff options
context:
space:
mode:
Diffstat (limited to 'ace/OS_NS_poll.inl')
-rw-r--r--ace/OS_NS_poll.inl37
1 files changed, 36 insertions, 1 deletions
diff --git a/ace/OS_NS_poll.inl b/ace/OS_NS_poll.inl
index fc532b41367..59ce51f1bc9 100644
--- a/ace/OS_NS_poll.inl
+++ b/ace/OS_NS_poll.inl
@@ -1,4 +1,39 @@
// -*- C++ -*-
// $Id$
-// This is a placeholder.
+#include "ace/Time_Value.h"
+
+ACE_INLINE int
+ACE_OS::poll (struct pollfd *pollfds,
+ unsigned long len,
+ const ACE_Time_Value *timeout)
+{
+ ACE_OS_TRACE ("ACE_OS::poll");
+#if defined (ACE_HAS_POLL)
+ int to = timeout == 0 ? -1 : int (timeout->msec ());
+ ACE_OSCALL_RETURN (::poll (pollfds, len, to), int, -1);
+#else
+ ACE_UNUSED_ARG (timeout);
+ ACE_UNUSED_ARG (len);
+ ACE_UNUSED_ARG (pollfds);
+
+ ACE_NOTSUP_RETURN (-1);
+#endif /* ACE_HAS_POLL */
+}
+
+ACE_INLINE int
+ACE_OS::poll (struct pollfd *pollfds,
+ unsigned long len,
+ const ACE_Time_Value &timeout)
+{
+ ACE_OS_TRACE ("ACE_OS::poll");
+#if defined (ACE_HAS_POLL)
+ ACE_OSCALL_RETURN (::poll (pollfds, len, int (timeout.msec ())), int, -1);
+#else
+ ACE_UNUSED_ARG (timeout);
+ ACE_UNUSED_ARG (len);
+ ACE_UNUSED_ARG (pollfds);
+
+ ACE_NOTSUP_RETURN (-1);
+#endif /* ACE_HAS_POLL */
+}