int ACE_Module_Type::resume (void) const { ACE_TRACE ("ACE_Module_Type::resume"); void *obj = this->object (); MT_Module *mod = (MT_Module *) obj; MT_Task *reader = mod->reader (); MT_Task *writer = mod->writer (); if (reader->resume () == -1 || writer->resume () == -1) return -1; else return 0; }
int ACE_Module_Type::init (int argc, ACE_TCHAR *argv[]) const { ACE_TRACE ("ACE_Module_Type::init"); void *obj = this->object (); MT_Module *mod = (MT_Module *) obj; MT_Task *reader = mod->reader (); MT_Task *writer = mod->writer (); if (reader->init (argc, argv) == -1 || writer->init (argc, argv) == -1) return -1; else return 0; }
int ACE_Module_Type::fini (void) const { ACE_TRACE ("ACE_Module_Type::fini"); void *obj = this->object (); MT_Module *mod = (MT_Module *) obj; MT_Task *reader = mod->reader (); MT_Task *writer = mod->writer (); if (reader != 0) reader->fini (); if (writer != 0) writer->fini (); // Close the module and delete the memory. mod->close (MT_Module::M_DELETE); return ACE_Service_Type_Impl::fini (); }
int ACE_Module_Type::init (int argc, ACE_TCHAR *argv[]) const { ACE_TRACE ("ACE_Module_Type::init"); void *obj = this->object (); MT_Module *mod = (MT_Module *) obj; // // Change the Module's name to what's in the svc.conf file. // We must do this so the names match up so everything shuts // down properly during the call to ACE_Stream_Type::fini // which calls MT_Stream::remove([name]) for all the modules. // If the calls to remove fail, we end up with a double delete // during shutdown. Bugzilla #3847 // mod->name (this->name_); MT_Task *reader = mod->reader (); MT_Task *writer = mod->writer (); if (reader->init (argc, argv) == -1 || writer->init (argc, argv) == -1) return -1; else return 0; }