summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/tasksetpriority.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-05-28 13:37:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-06-03 08:15:16 +0200
commit6c7caa1a9e1587dcc069aa811e9086c220b03ea8 (patch)
tree5470465893d892e0f0caffd3033e7b6efe68c508 /cpukit/rtems/src/tasksetpriority.c
parentscore: Add Resource Handler (diff)
downloadrtems-6c7caa1a9e1587dcc069aa811e9086c220b03ea8.tar.bz2
score: Add and use _Thread_Owns_resources()
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 );
}