OpenDDS::DCPS::ShmemTransport::ReadTask Struct Reference

Inheritance diagram for OpenDDS::DCPS::ShmemTransport::ReadTask:

Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::ShmemTransport::ReadTask:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ReadTask (ShmemTransport *outer, ACE_sema_t semaphore)
int svc ()
void stop ()

Public Attributes

ShmemTransportouter_
ACE_sema_t semaphore_
bool stopped_

Detailed Description

Definition at line 83 of file ShmemTransport.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::ShmemTransport::ReadTask::ReadTask ( ShmemTransport outer,
ACE_sema_t  semaphore 
)

Definition at line 269 of file ShmemTransport.cpp.

00270   : outer_(outer)
00271   , semaphore_(semaphore)
00272   , stopped_(false)
00273 {
00274   activate();
00275 }


Member Function Documentation

void OpenDDS::DCPS::ShmemTransport::ReadTask::stop (  ) 

Definition at line 291 of file ShmemTransport.cpp.

References semaphore_, and stopped_.

Referenced by OpenDDS::DCPS::ShmemTransport::shutdown_i().

00292 {
00293   stopped_ = true;
00294   ACE_OS::sema_post(&semaphore_);
00295   wait();
00296 }

int OpenDDS::DCPS::ShmemTransport::ReadTask::svc (  ) 

Definition at line 278 of file ShmemTransport.cpp.

References outer_, OpenDDS::DCPS::ShmemTransport::read_from_links(), semaphore_, and stopped_.

00279 {
00280   while (true) {
00281     ACE_OS::sema_wait(&semaphore_);
00282     if (stopped_) {
00283       return 0;
00284     }
00285     outer_->read_from_links();
00286   }
00287   return 1;
00288 }


Member Data Documentation

ShmemTransport* OpenDDS::DCPS::ShmemTransport::ReadTask::outer_

Definition at line 88 of file ShmemTransport.h.

Referenced by svc().

ACE_sema_t OpenDDS::DCPS::ShmemTransport::ReadTask::semaphore_

Definition at line 89 of file ShmemTransport.h.

Referenced by OpenDDS::DCPS::ShmemTransport::signal_semaphore(), stop(), and svc().

bool OpenDDS::DCPS::ShmemTransport::ReadTask::stopped_

Definition at line 90 of file ShmemTransport.h.

Referenced by stop(), and svc().


The documentation for this struct was generated from the following files:
Generated on Fri Feb 12 20:06:38 2016 for OpenDDS by  doxygen 1.4.7