Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Init_ACE.cpp
blob65e551ca81cd3c12e3e79d0cd118f3de330e338e
1 #include "ace/Init_ACE.h"
3 #include "ace/Object_Manager.h"
5 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
7 unsigned int ACE::init_fini_count_ = 0;
9 int
10 ACE::init ()
12 // Don't use ACE_TRACE, because Object_Manager might not have been
13 // instantiated yet.
14 // ACE_TRACE ("ACE::init");
15 ++ACE::init_fini_count_;
17 return ACE_Object_Manager::instance ()->init ();
20 int
21 ACE::fini ()
23 ACE_TRACE ("ACE::fini");
25 if (ACE::init_fini_count_ > 0)
27 if (--ACE::init_fini_count_ == 0)
28 return ACE_Object_Manager::instance ()->fini ();
29 else
30 // Wait for remaining fini () calls.
31 return 1;
33 else
34 // More ACE::fini () calls than ACE::init () calls. Bad
35 // application!
36 return -1;
39 ACE_END_VERSIONED_NAMESPACE_DECL