diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-04-13 14:14:10 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-04-13 14:14:10 +0000 |
commit | aae29a405c5030252aefec988f91743778ded232 (patch) | |
tree | 8f75aabe6a123041b9d3e05b9b8a367ca013ee03 | |
parent | 7ffae6f49e85ec975aadc1d9cbb5642de525caed (diff) | |
download | ATCD-aae29a405c5030252aefec988f91743778ded232.tar.gz |
only use THR_SCHED_FIFO if it is defined
-rw-r--r-- | tests/Priority_Task_Test.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/Priority_Task_Test.cpp b/tests/Priority_Task_Test.cpp index c53f4dd08f1..6b8cde7b435 100644 --- a/tests/Priority_Task_Test.cpp +++ b/tests/Priority_Task_Test.cpp @@ -54,9 +54,18 @@ int Priority_Task::open (void *arg) { this->priority_ = *(int *) arg; + + long flags = THR_NEW_LWP; +#if defined (THR_SCHED_FIFO) + // To get FIFO scheduling with PTHREADS. Instead of doing this, + // OS.h should be fixed to defined THR_SCHED_FIFO on non-PTHREADS + // platforms, such as Solaris with STHREADS and without PTHREADS. + flags |= THR_SCHED_FIFO; +#endif /* THR_SCHED_FIFO */ + // Become an active object. - ACE_ASSERT (this->activate (THR_NEW_LWP | THR_SCHED_FIFO, - 1, 0, this->priority_) != -1); + ACE_ASSERT (this->activate (flags, 1, 0, this->priority_) != -1); + return 0; } |