From 24e033e979784b4fa53b93e07be30a793384611f Mon Sep 17 00:00:00 2001 From: Chris Cleeland Date: Sun, 23 Feb 1997 04:25:27 +0000 Subject: *** empty log message *** --- ChangeLog-97a | 4 ++++ tests/Priority_Task_Test.cpp | 10 +++++++--- tests/run_tests.sh | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog-97a b/ChangeLog-97a index c8cc324a3a2..61a5f360f7b 100644 --- a/ChangeLog-97a +++ b/ChangeLog-97a @@ -1,5 +1,9 @@ Sat Feb 22 22:07:35 1997 Chris Cleeland + * tests/Priority_Task_Test.cpp (open): Now use + ACE_Thread_Priority while setting the priority of the new + thread. + * ace/Thread_Priority.cpp (convert_to_os_priority): Changed return type for this to 'int' from 'long' on Linux. Thanks to James CE Johnson for pointing this diff --git a/tests/Priority_Task_Test.cpp b/tests/Priority_Task_Test.cpp index 68970495ad7..dea09daf1ce 100644 --- a/tests/Priority_Task_Test.cpp +++ b/tests/Priority_Task_Test.cpp @@ -19,6 +19,7 @@ #include "ace/Service_Config.h" #include "ace/Task.h" +#include "ace/Thread_Priority.h" #include "test_config.h" #if defined (ACE_HAS_THREADS) @@ -52,9 +53,12 @@ Priority_Task::close (u_long) int Priority_Task::open (void *arg) { - this->priority_ = *(int *) arg; + ACE_Thread_Priority priority(ACE_Thread_Priority::ACE_HIGH_PRIORITY_CLASS, + ACE_Thread_Priority::Thread_Priority(*(int *) arg)); + // Become an active object. - ACE_ASSERT (this->activate (THR_NEW_LWP, 1, 0, this->priority_) != -1); + ACE_ASSERT (this->activate (THR_NEW_LWP, 1, 0, + priority.os_default_thread_priority()) != -1); return 0; } @@ -90,7 +94,7 @@ main (int, char *[]) int i; - // Spawn of ACE_MAX_ITERATIONS of tasks, passing each one their + // Spawn off ACE_MAX_ITERATIONS of tasks, passing each one their // iteration number as their priority. for (i = 0; i < ACE_MAX_ITERATIONS; i++) diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 135d7058855..2ef59eee017 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -41,6 +41,7 @@ run() echo "Starting tests..." +run TSS_Test # uses Task, Mutex, Guard run Time_Value_Test run SString_Test run Naming_Test # uses Naming_Context, WString @@ -64,7 +65,6 @@ run Reactor_Notify_Test # uses Reactor's notify() method, Task run Reactor_Timer_Test # uses Event_Handler, Reactor run Reader_Writer_Test # uses Thread_Manager, Mutex run SOCK_Test # uses Thread_Manager, SOCK_SAP -run TSS_Test # uses Task, Mutex, Guard # ifdef ACE_HAS_STREAM_PIPES run SPIPE_Test # uses SPIPE_Acceptor/Connector, Thread_Manager -- cgit v1.2.1