summaryrefslogtreecommitdiff
path: root/ACE/ace/Sched_Params.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/Sched_Params.cpp')
-rw-r--r--ACE/ace/Sched_Params.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/ACE/ace/Sched_Params.cpp b/ACE/ace/Sched_Params.cpp
index 9a699c773f9..7241cb14bde 100644
--- a/ACE/ace/Sched_Params.cpp
+++ b/ACE/ace/Sched_Params.cpp
@@ -115,10 +115,14 @@ ACE_Sched_Params::priority_min (const Policy policy,
}
}
-#elif defined (ACE_HAS_WTHREADS)
+#elif defined (ACE_HAS_WTHREADS) && !defined (ACE_HAS_WINCE)
ACE_UNUSED_ARG (policy);
ACE_UNUSED_ARG (scope);
return THREAD_PRIORITY_IDLE;
+#elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WINCE)
+ ACE_UNUSED_ARG (policy);
+ ACE_UNUSED_ARG (scope);
+ return 255;
#elif defined (ACE_VXWORKS)
ACE_UNUSED_ARG (policy);
ACE_UNUSED_ARG (scope);
@@ -219,10 +223,14 @@ ACE_Sched_Params::priority_max (const Policy policy,
}
}
-#elif defined (ACE_HAS_WTHREADS)
+#elif defined (ACE_HAS_WTHREADS) && !defined (ACE_HAS_WINCE)
ACE_UNUSED_ARG (policy);
ACE_UNUSED_ARG (scope);
return THREAD_PRIORITY_TIME_CRITICAL;
+#elif defined (ACE_HAS_WTHREADS) && defined (ACE_HAS_WINCE)
+ ACE_UNUSED_ARG (policy);
+ ACE_UNUSED_ARG (scope);
+ return 0;
#elif defined (ACE_VXWORKS)
ACE_UNUSED_ARG (policy);
ACE_UNUSED_ARG (scope);
@@ -243,7 +251,7 @@ ACE_Sched_Params::next_priority (const Policy policy,
const int priority,
const int scope)
{
-#if defined (ACE_HAS_WTHREADS)
+#if defined (ACE_HAS_WTHREADS) && !defined (ACE_HAS_WINCE)
ACE_UNUSED_ARG (policy);
ACE_UNUSED_ARG (scope);
switch (priority)
@@ -271,10 +279,9 @@ ACE_Sched_Params::next_priority (const Policy policy,
// including STHREADS, and PTHREADS
int const max = priority_max (policy, scope);
return priority < max ? priority + 1 : max;
-#elif defined (ACE_VXWORKS)
- return priority > priority_max (policy, scope)
- ? priority - 1
- : priority_max (policy, scope);
+#elif defined (ACE_VXWORKS) || defined (ACE_HAS_WINCE)
+ int const max = priority_max (policy, scope);
+ return priority > max ? priority - 1 : max;
#else
ACE_UNUSED_ARG (policy);
ACE_UNUSED_ARG (scope);
@@ -288,7 +295,7 @@ ACE_Sched_Params::previous_priority (const Policy policy,
const int priority,
const int scope)
{
-#if defined (ACE_HAS_WTHREADS)
+#if defined (ACE_HAS_WTHREADS) && !defined (ACE_HAS_WINCE)
ACE_UNUSED_ARG (policy);
ACE_UNUSED_ARG (scope);
switch (priority)
@@ -315,12 +322,10 @@ ACE_Sched_Params::previous_priority (const Policy policy,
defined (ACE_HAS_PTHREAD_SCHEDPARAM))
// including STHREADS and PTHREADS
int const min = priority_min (policy, scope);
-
return priority > min ? priority - 1 : min;
-#elif defined (ACE_VXWORKS)
- return priority < priority_min (policy, scope)
- ? priority + 1
- : priority_min (policy, scope);
+#elif defined (ACE_VXWORKS) || defined (ACE_HAS_WINCE)
+ int const min = priority_min (policy, scope);
+ return priority < min ? priority + 1 : min;
#else
ACE_UNUSED_ARG (policy);
ACE_UNUSED_ARG (scope);