3 //=============================================================================
5 * @file Non_Servant_Upcall.h
7 * @author Irfan Pyarali
9 //=============================================================================
11 #ifndef TAO_NONSERVANT_UPCALL_H
12 #define TAO_NONSERVANT_UPCALL_H
14 #include /**/ "ace/pre.h"
16 #include "tao/PortableServer/portableserver_export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/orbconf.h"
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 // Forward declaration
28 class TAO_Object_Adapter
;
32 namespace Portable_Server
35 * @class Non_Servant_Upcall
37 * @brief This class helps us with a recursive thread lock without
38 * using a recursive thread lock. Non_Servant_Upcall has a
39 * magic constructor and destructor. We unlock the
40 * Object_Adapter lock for the duration of the non-servant
41 * (i.e., adapter activator and servant activator) upcalls;
42 * reacquiring once the upcalls complete. Even though we are
43 * releasing the lock, other threads will not be able to make
45 * <Object_Adapter::non_servant_upcall_in_progress_> has been
48 class TAO_PortableServer_Export Non_Servant_Upcall
52 Non_Servant_Upcall (::TAO_Root_POA
&poa
);
55 ~Non_Servant_Upcall ();
57 ::TAO_Root_POA
&poa () const;
60 TAO_Object_Adapter
&object_adapter_
;
62 Non_Servant_Upcall
*previous_
;
67 TAO_END_VERSIONED_NAMESPACE_DECL
69 #if defined (__ACE_INLINE__)
70 # include "tao/PortableServer/Non_Servant_Upcall.inl"
71 #endif /* __ACE_INLINE__ */
73 #include /**/ "ace/post.h"
75 #endif /* TAO_NONSERVANT_UPCALL_H */