LCOV - code coverage report
Current view: top level - DCPS - ReactorTask.inl (source / functions) Hit Total Coverage
Test: coverage.info Lines: 18 18 100.0 %
Date: 2023-04-30 01:32:43 Functions: 4 4 100.0 %

          Line data    Source code
       1             : /*
       2             :  *
       3             :  *
       4             :  * Distributed under the OpenDDS License.
       5             :  * See: http://www.opendds.org/license.html
       6             :  */
       7             : 
       8             : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
       9             : 
      10             : namespace OpenDDS {
      11             : namespace DCPS {
      12             : 
      13             : ACE_INLINE
      14          12 : ACE_Reactor* ReactorTask::get_reactor()
      15             : {
      16          12 :   ACE_Guard<ACE_SYNCH_MUTEX> guard(lock_);
      17          12 :   return reactor_;
      18          12 : }
      19             : 
      20             : ACE_INLINE
      21             : const ACE_Reactor* ReactorTask::get_reactor() const
      22             : {
      23             :   ACE_Guard<ACE_SYNCH_MUTEX> guard(lock_);
      24             :   wait_for_startup_i();
      25             :   return reactor_;
      26             : }
      27             : 
      28             : ACE_INLINE
      29           3 : ACE_thread_t ReactorTask::get_reactor_owner() const
      30             : {
      31           3 :   ACE_Guard<ACE_SYNCH_MUTEX> guard(lock_);
      32           3 :   wait_for_startup_i();
      33           3 :   return reactor_owner_;
      34           3 : }
      35             : 
      36             : ACE_INLINE
      37             : ACE_Proactor* ReactorTask::get_proactor()
      38             : {
      39             :   ACE_Guard<ACE_SYNCH_MUTEX> guard(lock_);
      40             :   return proactor_;
      41             : }
      42             : 
      43             : ACE_INLINE
      44             : const ACE_Proactor* ReactorTask::get_proactor() const
      45             : {
      46             :   ACE_Guard<ACE_SYNCH_MUTEX> guard(lock_);
      47             :   return proactor_;
      48             : }
      49             : 
      50             : ACE_INLINE
      51             : void ReactorTask::wait_for_startup() const
      52             : {
      53             :   ACE_Guard<ACE_SYNCH_MUTEX> guard(lock_);
      54             :   wait_for_startup_i();
      55             : }
      56             : 
      57             : ACE_INLINE
      58          23 : bool ReactorTask::is_shut_down() const
      59             : {
      60          23 :   ACE_Guard<ACE_SYNCH_MUTEX> guard(lock_);
      61          23 :   return state_ == STATE_SHUT_DOWN;
      62          23 : }
      63             : 
      64             : ACE_INLINE
      65          14 : ReactorInterceptor_rch ReactorTask::interceptor() const
      66             : {
      67          14 :   ACE_Guard<ACE_SYNCH_MUTEX> guard(lock_);
      68          14 :   wait_for_startup_i();
      69          28 :   return interceptor_;
      70          14 : }
      71             : 
      72             : } // namespace DCPS
      73             : } // namespace OpenDDS
      74             : 
      75             : OPENDDS_END_VERSIONED_NAMESPACE_DECL

Generated by: LCOV version 1.16