diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-05-04 14:04:34 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-05-04 14:04:34 +0000 |
commit | ff8a670a1b7f23f5d0c78d9218cb4581fdfa4767 (patch) | |
tree | d8b6245b186fd9defa366bbb0b9fcd179d7668ee /TAO/performance-tests | |
parent | 8e67c717e8815ced078498776a3a7cb6d62a2001 (diff) | |
download | ATCD-ff8a670a1b7f23f5d0c78d9218cb4581fdfa4767.tar.gz |
removed ACE_OS::thr_setprio class to set LWP priority, now that ACE handles that internally
Diffstat (limited to 'TAO/performance-tests')
3 files changed, 11 insertions, 76 deletions
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp index e4ea104c394..f67e3f9f784 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Task_Client.cpp @@ -246,19 +246,6 @@ Client::get_low_priority_jitter (void) int Client::svc (void) { - // On Solaris 2.5.x, the LWP priority needs to be set. This is the - // ACE way to do that . . . - ACE_hthread_t thr_handle; - ACE_Thread::self (thr_handle); - int prio; - - if (ACE_Thread::getprio (thr_handle, prio) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "getprio failed"), -1); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client::svc; set my priority to %d\n", - prio)); - ACE_OS::thr_setprio (prio); - Cubit_ptr cb = 0; CORBA::ORB_var orb; CORBA::Object_var objref (0); @@ -538,10 +525,10 @@ Client::svc (void) // Perform the tests. int result = this->run_tests (cb, - ts_->loop_count_, + ts_->loop_count_, this->id_, ts_->datatype_, - frequency); + frequency); if (result == -1) return -1; @@ -604,15 +591,15 @@ Client::run_tests (Cubit_ptr cb, if ( (i % ts_->granularity_) == 0) { - if (ts_->use_utilization_test_ == 0) - { - ACE_Time_Value tv (0, - (u_long) ((sleep_time - delta) < 0 - ? 0 - : (sleep_time - delta))); - ACE_OS::sleep (tv); - } - + if (ts_->use_utilization_test_ == 0) + { + ACE_Time_Value tv (0, + (u_long) ((sleep_time - delta) < 0 + ? 0 + : (sleep_time - delta))); + ACE_OS::sleep (tv); + } + #if defined (CHORUS) pstartTime = pccTime1Get(); #else /* CHORUS */ @@ -981,19 +968,6 @@ Yield_Test::~Yield_Test() int Yield_Test::svc () { - // On Solaris 2.5.x, the LWP priority needs to be set. This is the - // ACE way to do that . . . - ACE_hthread_t thr_handle; - ACE_Thread::self (thr_handle); - int prio; - - if (ACE_Thread::getprio (thr_handle, prio) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "getprio failed"), -1); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Yield_Test::svc; set my priority to %d\n", - prio)); - ACE_OS::thr_setprio (prio); - for (unsigned long i = 0; i < iterations_; ++i) { ACE_OS::thr_yield (); diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp index 9c26d91d6a6..46c26e31ff9 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/Util_Thread.cpp @@ -14,19 +14,6 @@ Util_Thread::Util_Thread (Task_State *ts, int Util_Thread::svc (void) { - // On Solaris 2.5.x, the LWP priority needs to be set. This is the - // ACE way to do that . . . - ACE_hthread_t thr_handle; - ACE_Thread::self (thr_handle); - int prio; - - if (ACE_Thread::getprio (thr_handle, prio) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "getprio failed"), -1); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t): Util_Thread::svc; set my priority to %d\n", - prio)); - ACE_OS::thr_setprio (prio); - ACE_DEBUG ((LM_DEBUG, "(%t) Utilization Thread created, " "waiting for threads to finish binding\n")); diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp b/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp index e8c83406104..5a94991a918 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/server.cpp @@ -47,19 +47,6 @@ Cubit_Task::Cubit_Task (const char *args, int Cubit_Task::svc (void) { - // On Solaris 2.5.x, the LWP priority needs to be set. This is the - // ACE way to do that . . . - ACE_hthread_t thr_handle; - ACE_Thread::self (thr_handle); - int prio; - - if (ACE_Thread::getprio (thr_handle, prio) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "getprio failed"), -1); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Cubit_Task::svc; set my priority to %d\n", - prio)); - ACE_OS::thr_setprio (prio); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Beginning Cubit task with args = '%s'\n", orbargs_)); @@ -419,19 +406,6 @@ Cubit_Factory_Task::create_factory (void) int Cubit_Factory_Task::svc (void) { - // On Solaris 2.5.x, the LWP priority needs to be set. This is the - // ACE way to do that . . . - ACE_hthread_t thr_handle; - ACE_Thread::self (thr_handle); - int prio; - - if (ACE_Thread::getprio (thr_handle, prio) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "getprio failed"), -1); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Cubit_Factor_Task::svc; set my priority to %d\n", - prio)); - ACE_OS::thr_setprio (prio); - ACE_DEBUG ((LM_DEBUG, ">>> (%P|%t) Beginning Cubit Factory task with args = '%s'\n", orbargs_)); |