diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-10-13 19:47:56 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-10-13 19:47:56 +0000 |
commit | 343ffa896e2bc39f52e0180bb61a3c46e5d56212 (patch) | |
tree | 60d446bc526f410d9002520edfa81dd086d1269f /tests/Priority_Task_Test.cpp | |
parent | 74d2ffd40712c4371f1634877b0992123fc42a0f (diff) | |
download | ATCD-343ffa896e2bc39f52e0180bb61a3c46e5d56212.tar.gz |
ChangeLogTag:Mon Oct 13 14:10:30 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu>
Diffstat (limited to 'tests/Priority_Task_Test.cpp')
-rw-r--r-- | tests/Priority_Task_Test.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
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", |