00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file ThreadStrategySingle.h 00006 * 00007 * $Id: ThreadStrategySingle.h 75887 2006-12-07 08:01:14Z johnnyw $ 00008 * 00009 * @author Johnny Willemsen <jwillemsen@remedy.nl> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef TAO_THREADSTRATEGYSINGLE_H 00014 #define TAO_THREADSTRATEGYSINGLE_H 00015 #include /**/ "ace/pre.h" 00016 00017 #include "tao/PortableServer/portableserver_export.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 #include "tao/PortableServer/ThreadStrategy.h" 00024 00025 #include "tao/orbconf.h" 00026 00027 #include "ace/Service_Config.h" 00028 00029 // Locking 00030 #include "ace/Synch_Traits.h" 00031 #include "ace/Thread_Mutex.h" 00032 #include "ace/Recursive_Thread_Mutex.h" 00033 #include "ace/Null_Mutex.h" 00034 00035 00036 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) 00037 00038 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00039 00040 namespace TAO 00041 { 00042 namespace Portable_Server 00043 { 00044 class TAO_PortableServer_Export ThreadStrategySingle : 00045 public ThreadStrategy 00046 { 00047 public: 00048 virtual int enter (); 00049 00050 virtual int exit (); 00051 00052 virtual ::PortableServer::ThreadPolicyValue type() const; 00053 private: 00054 TAO_SYNCH_RECURSIVE_MUTEX lock_; 00055 }; 00056 } 00057 } 00058 00059 TAO_END_VERSIONED_NAMESPACE_DECL 00060 00061 ACE_STATIC_SVC_DECLARE_EXPORT (TAO_PortableServer, ThreadStrategySingle) 00062 ACE_FACTORY_DECLARE (TAO_PortableServer, ThreadStrategySingle) 00063 00064 #endif /* TAO_HAS_MINIMUM_POA == 0 */ 00065 00066 #include /**/ "ace/post.h" 00067 #endif /* TAO_THREADSTRATEGYSINGLE_H */