diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:30 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:30 +0000 |
commit | c44379cc7d9c7aa113989237ab0f56db12aa5219 (patch) | |
tree | 66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/ace/OS_NS_poll.inl | |
parent | 3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff) | |
download | ATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz |
Repo restructuring
Diffstat (limited to 'ACE/ace/OS_NS_poll.inl')
-rw-r--r-- | ACE/ace/OS_NS_poll.inl | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/ACE/ace/OS_NS_poll.inl b/ACE/ace/OS_NS_poll.inl new file mode 100644 index 00000000000..ab1b2d8b54e --- /dev/null +++ b/ACE/ace/OS_NS_poll.inl @@ -0,0 +1,45 @@ +// -*- C++ -*- +// +// $Id$ + +#include "ace/Time_Value.h" +#include "ace/OS_NS_errno.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +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 */ +} + +ACE_END_VERSIONED_NAMESPACE_DECL |