LCOV - code coverage report
Current view: top level - DCPS/transport/framework - ThreadSynchResource.inl (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 3 0.0 %
Date: 2023-04-30 01:32:43 Functions: 0 1 0.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             : #include "EntryExit.h"
       9             : #include "ace/ACE.h"
      10             : 
      11             : ACE_INLINE
      12             : OpenDDS::DCPS::ThreadSynchResource::ThreadSynchResource()
      13             :   : handle_(ACE_INVALID_HANDLE)
      14             :   , timeout_(0)
      15             : {
      16             :   DBG_ENTRY_LVL("ThreadSynchResource","ThreadSynchResource",6);
      17             : }
      18             : 
      19             : ACE_INLINE int
      20             : OpenDDS::DCPS::ThreadSynchResource::wait_to_unclog()
      21             : {
      22             :   DBG_ENTRY_LVL("ThreadSynchResource","wait_to_unclog",6);
      23             : 
      24             :   if (ACE::handle_write_ready(handle_, timeout_ ? &timeout_->value() : 0) == -1) {
      25             :     if (errno == ETIME) {
      26             :       ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: handle_write_ready timed out\n"));
      27             :       this->notify_lost_on_backpressure_timeout();
      28             : 
      29             :     } else {
      30             :       ACE_ERROR((LM_ERROR,
      31             :                  "(%P|%t) ERROR: ACE::handle_write_ready return -1 while waiting "
      32             :                  " to unclog. %p\n", ACE_TEXT("handle_write_ready")));
      33             :     }
      34             : 
      35             :     return -1;
      36             :   }
      37             : 
      38             :   return 0;
      39             : }
      40             : 
      41             : ACE_INLINE void
      42           0 : OpenDDS::DCPS::ThreadSynchResource::set_handle(ACE_HANDLE handle)
      43             : {
      44           0 :   handle_ = handle;
      45           0 : }

Generated by: LCOV version 1.16