s/Uint/UInt/g
[ACE_TAO.git] / TAO / tao / CSD_ThreadPool / CSD_TP_Request.inl
blobf0e81b2d87a05e84f4642682da53005500ca58f9
1 // -*- C++ -*-
2 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
4 ACE_INLINE
5 TAO::CSD::TP_Request::TP_Request(PortableServer::Servant servant,
6                                  TP_Servant_State*       servant_state)
7   : prev_(0),
8     next_(0),
9     servant_ (servant),
10     servant_state_(servant_state, false)
12   this->servant_->_add_ref ();
16 ACE_INLINE
17 void
18 TAO::CSD::TP_Request::prepare_for_queue()
20   this->prepare_for_queue_i();
24 ACE_INLINE
25 PortableServer::Servant
26 TAO::CSD::TP_Request::servant()
28   // Used for chaining so we do not return a new "copy".
29   return this->servant_.in();
33 ACE_INLINE
34 bool
35 TAO::CSD::TP_Request::is_ready() const
37   if (this->servant_state_.is_nil())
38     {
39       // This means that the serialization of servants is off.
40       // We always answer true here to indicate that the servant is
41       // never busy.
42       return true;
43     }
45   return !this->servant_state_->busy_flag();
49 ACE_INLINE
50 void
51 TAO::CSD::TP_Request::mark_as_busy()
53   if (!this->servant_state_.is_nil())
54     {
55       this->servant_state_->busy_flag(true);
56     }
60 ACE_INLINE
61 void
62 TAO::CSD::TP_Request::mark_as_ready()
64   if (!this->servant_state_.is_nil())
65     {
66       this->servant_state_->busy_flag(false);
67     }
71 ACE_INLINE
72 bool
73 TAO::CSD::TP_Request::is_target(PortableServer::Servant servant)
75   // Compare pointers.  Return true only if these are the exact same object.
76   return (servant == this->servant_.in());
80 ACE_INLINE
81 void
82 TAO::CSD::TP_Request::dispatch()
84   this->dispatch_i();
89 ACE_INLINE
90 void
91 TAO::CSD::TP_Request::cancel()
93   this->cancel_i();
96 TAO_END_VERSIONED_NAMESPACE_DECL