summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
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/rtems
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/rtems')
-rw-r--r--cpukit/rtems/src/ratemoncancel.c1
-rw-r--r--cpukit/rtems/src/ratemondelete.c1
-rw-r--r--cpukit/rtems/src/ratemonperiod.c7
3 files changed, 7 insertions, 2 deletions
diff --git a/cpukit/rtems/src/ratemoncancel.c b/cpukit/rtems/src/ratemoncancel.c
index 0b75d53fd7..ec6d450e85 100644
--- a/cpukit/rtems/src/ratemoncancel.c
+++ b/cpukit/rtems/src/ratemoncancel.c
@@ -53,6 +53,7 @@ rtems_status_code rtems_rate_monotonic_cancel(
}
(void) _Watchdog_Remove( &the_period->Timer );
the_period->state = RATE_MONOTONIC_INACTIVE;
+ _Scheduler_Release_job(the_period->owner, 0);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
diff --git a/cpukit/rtems/src/ratemondelete.c b/cpukit/rtems/src/ratemondelete.c
index 7349e5ed51..1ce298a497 100644
--- a/cpukit/rtems/src/ratemondelete.c
+++ b/cpukit/rtems/src/ratemondelete.c
@@ -51,6 +51,7 @@ rtems_status_code rtems_rate_monotonic_delete(
(void) _Watchdog_Remove( &the_period->Timer );
the_period->state = RATE_MONOTONIC_INACTIVE;
_Rate_monotonic_Free( the_period );
+ _Scheduler_Release_job(the_period->owner, 0);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
diff --git a/cpukit/rtems/src/ratemonperiod.c b/cpukit/rtems/src/ratemonperiod.c
index 1c18344955..4af3f90b5b 100644
--- a/cpukit/rtems/src/ratemonperiod.c
+++ b/cpukit/rtems/src/ratemonperiod.c
@@ -143,6 +143,8 @@ void _Rate_monotonic_Initiate_statistics(
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
}
#endif
+
+ _Scheduler_Release_job(the_period->owner, the_period->next_length);
}
void _Rate_monotonic_Update_statistics(
@@ -282,6 +284,8 @@ rtems_status_code rtems_rate_monotonic_period(
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
+ the_period->next_length = length;
+
/*
* Baseline statistics information for the beginning of a period.
*/
@@ -295,8 +299,6 @@ rtems_status_code rtems_rate_monotonic_period(
NULL
);
- the_period->next_length = length;
-
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
@@ -353,6 +355,7 @@ rtems_status_code rtems_rate_monotonic_period(
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
+ _Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
}