Non_Servant_Upcall.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Non_Servant_Upcall.h
00006  *
00007  *  $Id: Non_Servant_Upcall.h 71473 2006-03-10 07:19:20Z jtc $
00008  *
00009  *  @author Irfan Pyarali
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_NONSERVANT_UPCALL_H
00014 #define TAO_NONSERVANT_UPCALL_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "tao/PortableServer/portableserver_export.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "tao/orbconf.h"
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 // Forward declaration
00029 class TAO_Root_POA;
00030 class TAO_Object_Adapter;
00031 
00032 namespace TAO
00033 {
00034   namespace Portable_Server
00035   {
00036     /**
00037      * @class Non_Servant_Upcall
00038      *
00039      * @brief This class helps us with a recursive thread lock without
00040      * using a recursive thread lock.  Non_Servant_Upcall has a
00041      * magic constructor and destructor.  We unlock the
00042      * Object_Adapter lock for the duration of the non-servant
00043      * (i.e., adapter activator and servant activator) upcalls;
00044      * reacquiring once the upcalls complete.  Even though we are
00045      * releasing the lock, other threads will not be able to make
00046      * progress since
00047      * <Object_Adapter::non_servant_upcall_in_progress_> has been
00048      * set.
00049      */
00050     class TAO_PortableServer_Export Non_Servant_Upcall
00051     {
00052     public:
00053 
00054       /// Constructor.
00055       Non_Servant_Upcall (::TAO_Root_POA &poa);
00056 
00057       /// Destructor.
00058       ~Non_Servant_Upcall (void);
00059 
00060       ::TAO_Root_POA &poa (void) const;
00061 
00062     protected:
00063 
00064       TAO_Object_Adapter &object_adapter_;
00065       TAO_Root_POA &poa_;
00066       Non_Servant_Upcall *previous_;
00067     };
00068   }
00069 }
00070 
00071 TAO_END_VERSIONED_NAMESPACE_DECL
00072 
00073 #if defined (__ACE_INLINE__)
00074 # include "tao/PortableServer/Non_Servant_Upcall.inl"
00075 #endif /* __ACE_INLINE__ */
00076 
00077 #include /**/ "ace/post.h"
00078 
00079 #endif /* TAO_NONSERVANT_UPCALL_H */

Generated on Tue Feb 2 17:40:54 2010 for TAO_PortableServer by  doxygen 1.4.7