From: Karel G. <kg...@us...> - 2001-12-12 20:29:21
|
Update of /cvsroot/micomt/mico/orb In directory usw-pr-cvs1:/tmp/cvs-serv12215/orb Modified Files: iop.cc mt_manager.cc orb.cc transport.cc Log Message: - removed _tpm static value from global MICO:: namespace into MTManager class Index: iop.cc =================================================================== RCS file: /cvsroot/micomt/mico/orb/iop.cc,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -r1.73 -r1.74 *** iop.cc 2001/11/24 19:45:26 1.73 --- iop.cc 2001/12/12 20:29:13 1.74 *************** *** 2060,2067 **** __NAME( name( "InputReader" ) ); conn = _conn; ! kt = _tpm->get_idle_thread( Operation::Reader ); assert (kt); kt->register_operation( this ); ! this->info().set_next_op( _tpm->get_thread_pool( MICO::Operation::DeCode ) ); kt->mark_busy(); } --- 2060,2067 ---- __NAME( name( "InputReader" ) ); conn = _conn; ! kt = MICO::MTManager::thread_pool_manager()->get_idle_thread( Operation::Reader ); assert (kt); kt->register_operation( this ); ! this->info().set_next_op( MICO::MTManager::thread_pool_manager()->get_thread_pool( MICO::Operation::DeCode ) ); kt->mark_busy(); } *************** *** 2094,2098 **** __NAME( mq->name ("GIOPConnWriter") ); input_mc = mq; ! kt = _tpm->get_idle_thread( Operation::Writer ); assert (kt); kt->register_operation( this ); --- 2094,2098 ---- __NAME( mq->name ("GIOPConnWriter") ); input_mc = mq; ! kt = MICO::MTManager::thread_pool_manager()->get_idle_thread( Operation::Writer ); assert (kt); kt->register_operation( this ); *************** *** 2341,2345 **** msg = new msg_type(new GIOPConnMsg(this, this->input(), GIOPConnCallback::InputReady)); ! _tpm->get_thread_pool(MICO::Operation::DeCode).put_msg(0, msg); return TRUE; } --- 2341,2345 ---- msg = new msg_type(new GIOPConnMsg(this, this->input(), GIOPConnCallback::InputReady)); ! MICO::MTManager::thread_pool_manager()->get_thread_pool(MICO::Operation::DeCode).put_msg(0, msg); return TRUE; } *************** *** 2374,2378 **** } ! _tpm->put_msg( MICO::Operation::ORB, msg ); } #else --- 2374,2378 ---- } ! MICO::MTManager::thread_pool_manager()->put_msg( MICO::Operation::ORB, msg ); } #else *************** *** 2790,2797 **** if (MICO::MTManager::thread_pool()) { ! _tpm->put_msg( MICO::Operation::ORB, msg ); } else { ! _tpm->get_operation(MICO::Operation::ORB)->process(msg); } } --- 2790,2797 ---- if (MICO::MTManager::thread_pool()) { ! MICO::MTManager::thread_pool_manager()->put_msg( MICO::Operation::ORB, msg ); } else { ! MICO::MTManager::thread_pool_manager()->get_operation(MICO::Operation::ORB)->process(msg); } } *************** *** 3289,3292 **** --- 3289,3293 ---- } while (again); #ifdef HAVE_THREADS + //cerr << "kill_conn" << endl << flush; conn->terminate(); #endif *************** *** 3321,3325 **** if (redo) { ! //FIXME: if we issue a redo, the write methode\ // will hit a delete conn object !!! assert( 0 ); --- 3322,3326 ---- if (redo) { ! //FIXME: if we issue a redo, the write methode // will hit a delete conn object !!! assert( 0 ); Index: mt_manager.cc =================================================================== RCS file: /cvsroot/micomt/mico/orb/mt_manager.cc,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** mt_manager.cc 2001/11/25 21:27:25 1.43 --- mt_manager.cc 2001/12/12 20:29:13 1.44 *************** *** 330,334 **** } - MICO::ThreadPoolManager *MICO::_tpm; struct MICO::tm_init_t tm_init[] = { --- 330,333 ---- *************** *** 380,384 **** tm_init[3].max = req_limit; ! _tpm = new MICO::ThreadPoolManager(); for (unsigned int i = 0; i < sizeof(tm_init)/sizeof(MICO::tm_init_t); i++) { --- 379,383 ---- tm_init[3].max = req_limit; ! _S_thread_pool_manager = new MICO::ThreadPoolManager(); for (unsigned int i = 0; i < sizeof(tm_init)/sizeof(MICO::tm_init_t); i++) { *************** *** 387,391 **** tm_init[i].max_idle, tm_init[i].min_idle ); ! _tpm->register_tp( tm_init[i].OP_type, *tp ); switch (tm_init[i].OP_type) { --- 386,390 ---- tm_init[i].max_idle, tm_init[i].min_idle ); ! _S_thread_pool_manager->register_tp( tm_init[i].OP_type, *tp ); switch (tm_init[i].OP_type) { *************** *** 420,429 **** } #ifdef DEBUG_NAMES ! _tpm->get_operation( MICO::Operation::DeCode )->name("InputHandler"); ! _tpm->get_operation( MICO::Operation::ORB )->name("MTDispatcher"); #endif } CORBA::Long MICO::MTManager::_S_concurrency_model = MICO::MTManager::_S_thread_pool; void --- 419,429 ---- } #ifdef DEBUG_NAMES ! _S_thread_pool_manager->get_operation( MICO::Operation::DeCode )->name("InputHandler"); ! _S_thread_pool_manager->get_operation( MICO::Operation::ORB )->name("MTDispatcher"); #endif } CORBA::Long MICO::MTManager::_S_concurrency_model = MICO::MTManager::_S_thread_pool; + MICO::ThreadPoolManager* MICO::MTManager::_S_thread_pool_manager = NULL; void Index: orb.cc =================================================================== RCS file: /cvsroot/micomt/mico/orb/orb.cc,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -r1.47 -r1.48 *** orb.cc 2001/11/25 21:27:25 1.47 --- orb.cc 2001/12/12 20:29:13 1.48 *************** *** 79,82 **** --- 79,83 ---- cond.timedwait( cond_mutex, tmout ); } else { + //cerr << "async" << endl << flush; cond.wait( cond_mutex ); } Index: transport.cc =================================================================== RCS file: /cvsroot/micomt/mico/orb/transport.cc,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** transport.cc 2001/10/26 20:00:02 1.22 --- transport.cc 2001/12/12 20:29:13 1.23 *************** *** 415,419 **** // each on runs in its own thread !! ! WorkerThread *kt = _tpm->get_thread_pool( MICO::Operation::Accept ).get_idle_thread(); kt->register_operation( this ); kt->mark_busy(); --- 415,419 ---- // each on runs in its own thread !! ! WorkerThread *kt = MICO::MTManager::thread_pool_manager()->get_thread_pool( MICO::Operation::Accept ).get_idle_thread(); kt->register_operation( this ); kt->mark_busy(); |