summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/tasksetpriority.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/src/tasksetpriority.c')
-rw-r--r--cpukit/rtems/src/tasksetpriority.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/rtems/src/tasksetpriority.c b/cpukit/rtems/src/tasksetpriority.c
index c7b0556c17..4e4835675d 100644
--- a/cpukit/rtems/src/tasksetpriority.c
+++ b/cpukit/rtems/src/tasksetpriority.c
@@ -48,7 +48,7 @@ rtems_status_code rtems_task_set_priority(
the_thread->real_priority = _RTEMS_tasks_Priority_to_Core(
new_priority
);
- if ( the_thread->resource_count == 0 ||
+ if ( !_Thread_Owns_resources( the_thread ) ||
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
}