From 343ffa896e2bc39f52e0180bb61a3c46e5d56212 Mon Sep 17 00:00:00 2001 From: coryan Date: Mon, 13 Oct 1997 19:47:56 +0000 Subject: ChangeLogTag:Mon Oct 13 14:10:30 1997 Carlos O'Ryan --- tests/Priority_Task_Test.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'tests/Priority_Task_Test.cpp') diff --git a/tests/Priority_Task_Test.cpp b/tests/Priority_Task_Test.cpp index ff72c86f1fd..42dfd8f363d 100644 --- a/tests/Priority_Task_Test.cpp +++ b/tests/Priority_Task_Test.cpp @@ -121,15 +121,20 @@ main (int, char *[]) // NOTE: on Solaris, for example, this requests the min FIFO // priority. But, this test doesn't use the Realtime scheduling // class. The FIFO priorities are used because they're all nonnegative. - int priority = ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD); + + ACE_Sched_Priority_Iterator priority (ACE_SCHED_FIFO, + ACE_SCOPE_THREAD); for (i = 0; i < ACE_MAX_ITERATIONS; i++) { - tasks[i].open ((void *) &priority); - priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO, - priority, - ACE_SCOPE_THREAD); + int p = priority.priority (); + tasks[i].open ((void *) &p); + + // If there are more priorities get the next one... + if (priority.more ()) + { + priority.next (); + } } ACE_DEBUG ((LM_DEBUG, "(%t) %d tasks spawned, wait for them to exit . . .\n", -- cgit v1.2.1