summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--Kokyu/DSRT_Schedulers.cpp9
-rw-r--r--Kokyu/tests/DSRT_MIF/MIF.cpp7
3 files changed, 20 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 07c3fa4dc98..f03059f8b89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Sat Apr 26 12:00:36 2003 Venkita Subramonian <venkita@cs.wustl.edu>
+
+ * Kokyu/DSRT_Scheduler.cpp:
+ Corrected calculation for priority range.
+
+ * Kokyu/tests/DSRT_MIF/MIF.cpp:
+ Modifications to set the priority of thread based on the value
+ returned from the scheduler.
+
Sat Apr 26 08:25:57 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
* performance-tests/SCTP/SOCK_SEQPACK_clt.cpp:
diff --git a/Kokyu/DSRT_Schedulers.cpp b/Kokyu/DSRT_Schedulers.cpp
index ea320838205..37831b58981 100644
--- a/Kokyu/DSRT_Schedulers.cpp
+++ b/Kokyu/DSRT_Schedulers.cpp
@@ -35,7 +35,7 @@ DSRT_Scheduler_Impl::DSRT_Scheduler_Impl ()
this->prio_range_ = n-1;
#else
- this->prio_range_ = this->max_prio_ - this->min_prio_;
+ this->prio_range_ = this->max_prio_ - this->min_prio_ + 1;
#endif /* ACE_WIN32 */
}
@@ -155,7 +155,12 @@ MIF_Scheduler_Impl::schedule_i (guid_t id, const DSRT_QoSDescriptor& qos)
ACE_UNUSED_ARG ((id));
ACE_DEBUG ((LM_DEBUG, "(%t) request for MIF schedule\n"));
- Priority_t prio_ = qos.importance_ * this->prio_range_ / this->importance_range_;
+ Priority_t prio = qos.importance_ * this->prio_range_ / this->importance_range_;
+
+ if (prio > max_prio_)
+ {
+ prio = max_prio_;
+ }
return prio_;
}
diff --git a/Kokyu/tests/DSRT_MIF/MIF.cpp b/Kokyu/tests/DSRT_MIF/MIF.cpp
index b701fa1338a..136523c8aaa 100644
--- a/Kokyu/tests/DSRT_MIF/MIF.cpp
+++ b/Kokyu/tests/DSRT_MIF/MIF.cpp
@@ -20,13 +20,14 @@ public:
int svc (void)
{
- dispatcher_->schedule (0, qos_);
- barrier_.wait ();
-
ACE_hthread_t thr_handle;
ACE_Thread::self (thr_handle);
int prio;
+ prio = dispatcher_->schedule (0, qos_);
+ ACE_Thread::setprio (thr_handle, prio);
+ barrier_.wait ();
+
if (ACE_Thread::getprio (thr_handle, prio) == -1)
{
if (errno == ENOTSUP)