summaryrefslogtreecommitdiff
path: root/ACE/ace/Handle_Gobbler.inl
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2008-03-04 13:56:48 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2008-03-04 13:56:48 +0000
commitc4078c377d74290ebe4e66da0b4975da91732376 (patch)
tree1816ef391e42a07929304908ac0e21f4c2f6cb7b /ACE/ace/Handle_Gobbler.inl
parent700d1c1a6be348c6c70a2085e559baeb8f4a62ea (diff)
downloadATCD-c4078c377d74290ebe4e66da0b4975da91732376.tar.gz
swap in externals for ACE and TAO
Diffstat (limited to 'ACE/ace/Handle_Gobbler.inl')
-rw-r--r--ACE/ace/Handle_Gobbler.inl78
1 files changed, 0 insertions, 78 deletions
diff --git a/ACE/ace/Handle_Gobbler.inl b/ACE/ace/Handle_Gobbler.inl
deleted file mode 100644
index e44035a7aed..00000000000
--- a/ACE/ace/Handle_Gobbler.inl
+++ /dev/null
@@ -1,78 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-// Since this is only included in Handle_Gobbler.h, these should be
-// inline, not ACE_INLINE.
-// FUZZ: disable check_for_inline
-
-#include "ace/OS_NS_unistd.h"
-#include "ace/OS_NS_fcntl.h"
-
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-
-inline void
-ACE_Handle_Gobbler::close_remaining_handles (void)
-{
- ACE_Handle_Set_Iterator iter (this->handle_set_);
- for (ACE_HANDLE h = iter (); h != ACE_INVALID_HANDLE; h = iter ())
- ACE_OS::close (h);
-}
-
-inline
-ACE_Handle_Gobbler::~ACE_Handle_Gobbler (void)
-{
- this->close_remaining_handles ();
-}
-
-inline int
-ACE_Handle_Gobbler::free_handles (size_t n_handles)
-{
- ACE_Handle_Set_Iterator iter (this->handle_set_);
- for (ACE_HANDLE h = iter ();
- h != ACE_INVALID_HANDLE && n_handles > 0;
- --n_handles, h = iter ())
- ACE_OS::close (h);
-
- return 0;
-}
-
-inline int
-ACE_Handle_Gobbler::consume_handles (size_t n_handles_to_keep_available)
-{
- int result = 0;
-
-#if defined(ACE_WIN32)
- // On Win32, this style of gobbling doesn't seem to work.
- ACE_UNUSED_ARG(n_handles_to_keep_available);
-
-#else
-
- while (1)
- {
- ACE_HANDLE handle = ACE_OS::open (ACE_DEV_NULL, O_WRONLY);
-
- if (handle == ACE_INVALID_HANDLE)
- {
- if (ACE::out_of_handles (errno))
- {
- result = this->free_handles (n_handles_to_keep_available);
- break;
- }
- else
- {
- result = -1;
- break;
- }
- }
- if (handle >= FD_SETSIZE)
- break;
- this->handle_set_.set_bit (handle);
- }
-
-#endif /* ACE_WIN32 */
-
- return result;
-}
-
-ACE_END_VERSIONED_NAMESPACE_DECL