summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-09-01 18:13:54 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-09-01 18:13:54 +0000
commitac9d2ecc46ea40b6da0ccaeeabd16e8c19ff47e0 (patch)
tree4f87d546461e9cc7cfd18ccc187073161fb333b7 /cpukit/score/src
parent2011-09-01 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-ac9d2ecc46ea40b6da0ccaeeabd16e8c19ff47e0.tar.bz2
2011-09-01 Petr Benes <benesp16@fel.cvut.cz>
PR 1895/cpukit * rtems/src/ratemoncancel.c, rtems/src/ratemondelete.c, rtems/src/ratemonperiod.c, sapi/include/confdefs.h, score/Makefile.am, score/include/rtems/score/scheduler.h, score/include/rtems/score/schedulerpriority.h, score/include/rtems/score/schedulersimple.h, score/include/rtems/score/schedulersimplesmp.h, score/inline/rtems/score/scheduler.inl, score/inline/rtems/score/schedulerpriority.inl, score/src/coremutexseize.c: Add priority_compare and release_job hooks interfaces to scheduler interface. * score/src/schedulerpriorityprioritycompare.c, score/src/schedulerpriorityreleasejob.c: New files.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/coremutexseize.c4
-rw-r--r--cpukit/score/src/schedulerpriorityprioritycompare.c27
-rw-r--r--cpukit/score/src/schedulerpriorityreleasejob.c27
3 files changed, 57 insertions, 1 deletions
diff --git a/cpukit/score/src/coremutexseize.c b/cpukit/score/src/coremutexseize.c
index 78b7dcab2c..1ac60f934b 100644
--- a/cpukit/score/src/coremutexseize.c
+++ b/cpukit/score/src/coremutexseize.c
@@ -60,7 +60,9 @@ void _CORE_mutex_Seize_interrupt_blocking(
executing = _Thread_Executing;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) {
- if ( the_mutex->holder->current_priority > executing->current_priority ) {
+ if ( _Scheduler_Is_priority_higher_than(
+ executing->current_priority,
+ the_mutex->holder->current_priority)) {
_Thread_Change_priority(
the_mutex->holder,
executing->current_priority,
diff --git a/cpukit/score/src/schedulerpriorityprioritycompare.c b/cpukit/score/src/schedulerpriorityprioritycompare.c
new file mode 100644
index 0000000000..85edb80d19
--- /dev/null
+++ b/cpukit/score/src/schedulerpriorityprioritycompare.c
@@ -0,0 +1,27 @@
+/*
+ * COPYRIGHT (c) 2011.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/config.h>
+#include <rtems/score/chain.h>
+#include <rtems/score/schedulerpriority.h>
+
+int _Scheduler_priority_Priority_compare(
+ Priority_Control p1,
+ Priority_Control p2
+)
+{
+ return _Scheduler_priority_Priority_compare_body( p1, p2 );
+}
diff --git a/cpukit/score/src/schedulerpriorityreleasejob.c b/cpukit/score/src/schedulerpriorityreleasejob.c
new file mode 100644
index 0000000000..2ef0cafb6c
--- /dev/null
+++ b/cpukit/score/src/schedulerpriorityreleasejob.c
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2011 Petr Benes.
+ * Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/config.h>
+#include <rtems/score/scheduler.h>
+#include <rtems/score/schedulerpriority.h>
+
+void _Scheduler_priority_Release_job(
+ Thread_Control *the_thread,
+ uint32_t deadline
+)
+{
+ return;
+}