Public Member Functions | |
ReadTask (ShmemTransport *outer, ACE_sema_t semaphore) | |
int | svc () |
void | stop () |
Public Attributes | |
ShmemTransport * | outer_ |
ACE_sema_t | semaphore_ |
bool | stopped_ |
Definition at line 83 of file ShmemTransport.h.
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 }
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 }
Definition at line 89 of file ShmemTransport.h.
Referenced by OpenDDS::DCPS::ShmemTransport::signal_semaphore(), stop(), and svc().