<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-09-01)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>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.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2910&r2=text&tr2=1.2911&diff_format=h">M</a></td><td width='1%'>1.2911</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/rtems/src/ratemoncancel.c.diff?r1=text&tr1=1.11&r2=text&tr2=1.12&diff_format=h">M</a></td><td width='1%'>1.12</td><td width='100%'>cpukit/rtems/src/ratemoncancel.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/rtems/src/ratemondelete.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</td><td width='100%'>cpukit/rtems/src/ratemondelete.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/rtems/src/ratemonperiod.c.diff?r1=text&tr1=1.30&r2=text&tr2=1.31&diff_format=h">M</a></td><td width='1%'>1.31</td><td width='100%'>cpukit/rtems/src/ratemonperiod.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/sapi/include/confdefs.h.diff?r1=text&tr1=1.169&r2=text&tr2=1.170&diff_format=h">M</a></td><td width='1%'>1.170</td><td width='100%'>cpukit/sapi/include/confdefs.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/Makefile.am.diff?r1=text&tr1=1.107&r2=text&tr2=1.108&diff_format=h">M</a></td><td width='1%'>1.108</td><td width='100%'>cpukit/score/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/include/rtems/score/scheduler.h.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>cpukit/score/include/rtems/score/scheduler.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/include/rtems/score/schedulerpriority.h.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</td><td width='100%'>cpukit/score/include/rtems/score/schedulerpriority.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/include/rtems/score/schedulersimple.h.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>cpukit/score/include/rtems/score/schedulersimple.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/include/rtems/score/schedulersimplesmp.h.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>cpukit/score/include/rtems/score/schedulersimplesmp.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/inline/rtems/score/scheduler.inl.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>cpukit/score/inline/rtems/score/scheduler.inl</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>cpukit/score/inline/rtems/score/schedulerpriority.inl</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/coremutexseize.c.diff?r1=text&tr1=1.18&r2=text&tr2=1.19&diff_format=h">M</a></td><td width='1%'>1.19</td><td width='100%'>cpukit/score/src/coremutexseize.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulerpriorityprioritycompare.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">cpukit/score/src/schedulerpriorityprioritycompare.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulerpriorityreleasejob.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">cpukit/score/src/schedulerpriorityreleasejob.c</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2910 rtems/cpukit/ChangeLog:1.2911
--- rtems/cpukit/ChangeLog:1.2910 Mon Aug 29 16:31:17 2011
+++ rtems/cpukit/ChangeLog Thu Sep 1 13:13:53 2011
</font><font color='#997700'>@@ -1,3 +1,19 @@
</font><font color='#000088'>+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.
+
</font> 2011-08-29 Joel Sherrill <joel.sherrilL@OARcorp.com>
* rtems/include/rtems/rtems/tasks.h: Formatting.
<font color='#006600'>diff -u rtems/cpukit/rtems/src/ratemoncancel.c:1.11 rtems/cpukit/rtems/src/ratemoncancel.c:1.12
--- rtems/cpukit/rtems/src/ratemoncancel.c:1.11 Sun Jul 24 18:55:10 2011
+++ rtems/cpukit/rtems/src/ratemoncancel.c Thu Sep 1 13:13:53 2011
</font><font color='#997700'>@@ -53,6 +53,7 @@
</font> }
(void) _Watchdog_Remove( &the_period->Timer );
the_period->state = RATE_MONOTONIC_INACTIVE;
<font color='#000088'>+ _Scheduler_Release_job(the_period->owner, 0);
</font> _Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
<font color='#006600'>diff -u rtems/cpukit/rtems/src/ratemondelete.c:1.10 rtems/cpukit/rtems/src/ratemondelete.c:1.11
--- rtems/cpukit/rtems/src/ratemondelete.c:1.10 Sun Jul 24 18:55:10 2011
+++ rtems/cpukit/rtems/src/ratemondelete.c Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -51,6 +51,7 @@
</font> (void) _Watchdog_Remove( &the_period->Timer );
the_period->state = RATE_MONOTONIC_INACTIVE;
_Rate_monotonic_Free( the_period );
<font color='#000088'>+ _Scheduler_Release_job(the_period->owner, 0);
</font> _Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
<font color='#006600'>diff -u rtems/cpukit/rtems/src/ratemonperiod.c:1.30 rtems/cpukit/rtems/src/ratemonperiod.c:1.31
--- rtems/cpukit/rtems/src/ratemonperiod.c:1.30 Sun Jul 24 18:55:10 2011
+++ rtems/cpukit/rtems/src/ratemonperiod.c Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -143,6 +143,8 @@
</font> _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
}
#endif
<font color='#000088'>+
+ _Scheduler_Release_job(the_period->owner, the_period->next_length);
</font> }
void _Rate_monotonic_Update_statistics(
<font color='#997700'>@@ -282,6 +284,8 @@
</font> if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
<font color='#000088'>+ the_period->next_length = length;
+
</font> /*
* Baseline statistics information for the beginning of a period.
*/
<font color='#997700'>@@ -295,8 +299,6 @@
</font> NULL
);
<font color='#880000'>- the_period->next_length = length;
-
</font> _Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
<font color='#997700'>@@ -353,6 +355,7 @@
</font> the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
<font color='#000088'>+ _Scheduler_Release_job(the_period->owner, the_period->next_length);
</font> _Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
}
<font color='#006600'>diff -u rtems/cpukit/sapi/include/confdefs.h:1.169 rtems/cpukit/sapi/include/confdefs.h:1.170
--- rtems/cpukit/sapi/include/confdefs.h:1.169 Wed Aug 17 04:14:09 2011
+++ rtems/cpukit/sapi/include/confdefs.h Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -661,6 +661,9 @@
</font> #if defined(CONFIGURE_SCHEDULER_USER)
#define CONFIGURE_SCHEDULER_ENTRY_POINTS \
CONFIGURE_SCHEDULER_USER_ENTRY_POINTS
<font color='#000088'>+
+ #define CONFIGURE_SCHEDULER_MEMORY_FOR_SCHEDULER \
+ CONFIGURE_SCHEDULER_USER_MEMORY_FOR_SCHEDULER
</font> #endif
/*<span style="background-color: #FF0000"> </span>
<font color='#006600'>diff -u rtems/cpukit/score/Makefile.am:1.107 rtems/cpukit/score/Makefile.am:1.108
--- rtems/cpukit/score/Makefile.am:1.107 Mon Aug 22 13:26:07 2011
+++ rtems/cpukit/score/Makefile.am Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -203,6 +203,8 @@
</font> src/schedulerpriorityenqueuefirst.c \
src/schedulerpriorityextract.c \
src/schedulerpriorityfree.c \
<font color='#000088'>+ src/schedulerpriorityprioritycompare.c \
+ src/schedulerpriorityreleasejob.c \
</font> src/schedulerpriorityschedule.c \
src/schedulerpriorityunblock.c \
src/schedulerpriorityupdate.c \
<font color='#006600'>diff -u rtems/cpukit/score/include/rtems/score/scheduler.h:1.7 rtems/cpukit/score/include/rtems/score/scheduler.h:1.8
--- rtems/cpukit/score/include/rtems/score/scheduler.h:1.7 Fri Jun 17 10:40:09 2011
+++ rtems/cpukit/score/include/rtems/score/scheduler.h Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -77,8 +77,18 @@
</font> /** extract a thread from the ready set */
void ( *extract )(Thread_Control *);
<font color='#000088'>+ /**
+ * Compares two priorities (returns >0 for higher priority, 0 for equal
+ * and <0 for lower priority).
+ */
+ int ( *priority_compare )(Priority_Control, Priority_Control);
+
+ /** This routine is called upon release of a new job. */
+ void ( *release_job ) (Thread_Control *, uint32_t);
+
</font> /** perform scheduler update actions required at each clock tick */
void ( *tick )(void);
<font color='#000088'>+
</font> } Scheduler_Operations;
/**
<font color='#997700'>@@ -107,6 +117,20 @@
</font> extern Scheduler_Control _Scheduler;
/**
<font color='#000088'>+ * Macro testing whether @a p1 has lower priority than @a p2
+ * in the intuitive sense of priority.
+ */
+#define _Scheduler_Is_priority_lower_than( _p1, _p2 ) \
+ (_Scheduler_Priority_compare(_p1,_p2) < 0)
+
+/**
+ * Macro testing whether @a p1 has higher priority than @a p2
+ * in the intuitive sense of priority.
+ */
+#define _Scheduler_Is_priority_higher_than( _p1, _p2 ) \
+ (_Scheduler_Priority_compare(_p1,_p2) > 0)
+
+/**
</font> * This routine initializes the scheduler to the policy chosen by the user
* through confdefs, or to the priority scheduler with ready chains by
* default.
<font color='#006600'>diff -u rtems/cpukit/score/include/rtems/score/schedulerpriority.h:1.10 rtems/cpukit/score/include/rtems/score/schedulerpriority.h:1.11
--- rtems/cpukit/score/include/rtems/score/schedulerpriority.h:1.10 Fri Jun 17 09:31:45 2011
+++ rtems/cpukit/score/include/rtems/score/schedulerpriority.h Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -38,18 +38,20 @@
</font> */
#define SCHEDULER_PRIORITY_ENTRY_POINTS \
{ \
<font color='#880000'>- _Scheduler_priority_Initialize, /* initialize entry point */ \
- _Scheduler_priority_Schedule, /* schedule entry point */ \
- _Scheduler_priority_Yield, /* yield entry point */ \
- _Scheduler_priority_Block, /* block entry point */ \
- _Scheduler_priority_Unblock, /* unblock entry point */ \
- _Scheduler_priority_Allocate, /* allocate entry point */ \
- _Scheduler_priority_Free, /* free entry point */ \
- _Scheduler_priority_Update, /* update entry point */ \
- _Scheduler_priority_Enqueue, /* enqueue entry point */ \
- _Scheduler_priority_Enqueue_first, /* enqueue_first entry point */ \
- _Scheduler_priority_Extract, /* extract entry point */ \
- _Scheduler_priority_Tick /* tick entry point */ \
</font><font color='#000088'>+ _Scheduler_priority_Initialize, /* initialize entry point */ \
+ _Scheduler_priority_Schedule, /* schedule entry point */ \
+ _Scheduler_priority_Yield, /* yield entry point */ \
+ _Scheduler_priority_Block, /* block entry point */ \
+ _Scheduler_priority_Unblock, /* unblock entry point */ \
+ _Scheduler_priority_Allocate, /* allocate entry point */ \
+ _Scheduler_priority_Free, /* free entry point */ \
+ _Scheduler_priority_Update, /* update entry point */ \
+ _Scheduler_priority_Enqueue, /* enqueue entry point */ \
+ _Scheduler_priority_Enqueue_first, /* enqueue_first entry point */ \
+ _Scheduler_priority_Extract, /* extract entry point */ \
+ _Scheduler_priority_Priority_compare, /* compares two priorities */ \
+ _Scheduler_priority_Release_job, /* new period of task */ \
+ _Scheduler_priority_Tick /* tick entry point */ \
</font> }
/**
<font color='#997700'>@@ -172,6 +174,30 @@
</font> );
/**
<font color='#000088'>+ * @brief Scheduler priority Priority compare
+ *
+ * This routine compares two priorities.
+ */
+int _Scheduler_priority_Priority_compare(
+ Priority_Control p1,
+ Priority_Control p2
+);
+
+/**
+ * @brief Scheduler priority Release job
+ *
+ * This routine is called when a new job of task is released.
+ *
+ * @param[in] the_thread is the owner of the job.
+ * @param[in] deadline of the new job from now. If equal to 0,
+ * the job was cancelled or deleted.
+ */
+void _Scheduler_priority_Release_job (
+ Thread_Control *the_thread,
+ uint32_t deadline
+);
+
+/**
</font> * @brief Deterministic Priority Scheduler Tick Method
*
* This routine is invoked as part of processing each clock tick.
<font color='#006600'>diff -u rtems/cpukit/score/include/rtems/score/schedulersimple.h:1.4 rtems/cpukit/score/include/rtems/score/schedulersimple.h:1.5
--- rtems/cpukit/score/include/rtems/score/schedulersimple.h:1.4 Fri Jun 17 09:31:45 2011
+++ rtems/cpukit/score/include/rtems/score/schedulersimple.h Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -35,18 +35,20 @@
</font> */
#define SCHEDULER_SIMPLE_ENTRY_POINTS \
{ \
<font color='#880000'>- _Scheduler_simple_Initialize, /* initialize entry point */ \
- _Scheduler_simple_Schedule, /* schedule entry point */ \
- _Scheduler_simple_Yield, /* yield entry point */ \
- _Scheduler_simple_Block, /* block entry point */ \
- _Scheduler_simple_Unblock, /* unblock entry point */ \
- _Scheduler_simple_Allocate, /* allocate entry point */ \
- _Scheduler_simple_Free, /* free entry point */ \
- _Scheduler_simple_Update, /* update entry point */ \
- _Scheduler_simple_Enqueue, /* enqueue entry point */ \
- _Scheduler_simple_Enqueue_first, /* enqueue_first entry point */ \
- _Scheduler_simple_Extract, /* extract entry point */ \
- _Scheduler_priority_Tick /* tick entry point */ \
</font><font color='#000088'>+ _Scheduler_simple_Initialize, /* initialize entry point */ \
+ _Scheduler_simple_Schedule, /* schedule entry point */ \
+ _Scheduler_simple_Yield, /* yield entry point */ \
+ _Scheduler_simple_Block, /* block entry point */ \
+ _Scheduler_simple_Unblock, /* unblock entry point */ \
+ _Scheduler_simple_Allocate, /* allocate entry point */ \
+ _Scheduler_simple_Free, /* free entry point */ \
+ _Scheduler_simple_Update, /* update entry point */ \
+ _Scheduler_simple_Enqueue, /* enqueue entry point */ \
+ _Scheduler_simple_Enqueue_first, /* enqueue_first entry point */ \
+ _Scheduler_simple_Extract, /* extract entry point */ \
+ _Scheduler_priority_Priority_compare, /* compares two priorities */ \
+ _Scheduler_priority_Release_job, /* new period of task */ \
+ _Scheduler_priority_Tick /* tick entry point */ \
</font> }
/**
<font color='#006600'>diff -u rtems/cpukit/score/include/rtems/score/schedulersimplesmp.h:1.4 rtems/cpukit/score/include/rtems/score/schedulersimplesmp.h:1.5
--- rtems/cpukit/score/include/rtems/score/schedulersimplesmp.h:1.4 Tue Jun 28 15:31:36 2011
+++ rtems/cpukit/score/include/rtems/score/schedulersimplesmp.h Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -40,24 +40,27 @@
</font>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulersimple.h>
<font color='#000088'>+#include <rtems/score/schedulerpriority.h>
</font>
/**
* Entry points for Scheduler Simple SMP
*/
#define SCHEDULER_SIMPLE_SMP_ENTRY_POINTS \
{ \
<font color='#880000'>- _Scheduler_simple_Initialize, /* initialize entry point */ \
- _Scheduler_simple_smp_Schedule, /* schedule entry point */ \
- _Scheduler_simple_Yield, /* yield entry point */ \
- _Scheduler_simple_smp_Block, /* block entry point */ \
- _Scheduler_simple_smp_Unblock, /* unblock entry point */ \
- _Scheduler_simple_Allocate, /* allocate entry point */ \
- _Scheduler_simple_Free, /* free entry point */ \
- _Scheduler_simple_Update, /* update entry point */ \
- _Scheduler_simple_Enqueue, /* enqueue entry point */ \
- _Scheduler_simple_Enqueue_first, /* enqueue_first entry point */ \
- _Scheduler_simple_Extract, /* extract entry point */ \
- _Scheduler_simple_smp_Tick /* tick entry point */ \
</font><font color='#000088'>+ _Scheduler_simple_Initialize, /* initialize entry point */ \
+ _Scheduler_simple_smp_Schedule, /* schedule entry point */ \
+ _Scheduler_simple_Yield, /* yield entry point */ \
+ _Scheduler_simple_smp_Block, /* block entry point */ \
+ _Scheduler_simple_smp_Unblock, /* unblock entry point */ \
+ _Scheduler_simple_Allocate, /* allocate entry point */ \
+ _Scheduler_simple_Free, /* free entry point */ \
+ _Scheduler_simple_Update, /* update entry point */ \
+ _Scheduler_simple_Enqueue, /* enqueue entry point */ \
+ _Scheduler_simple_Enqueue_first, /* enqueue_first entry point */ \
+ _Scheduler_simple_Extract, /* extract entry point */ \
+ _Scheduler_priority_Priority_compare, /* compares two priorities */ \
+ _Scheduler_priority_Release_job, /* new period of task */ \
+ _Scheduler_simple_smp_Tick /* tick entry point */ \
</font> }
/**
<font color='#006600'>diff -u rtems/cpukit/score/inline/rtems/score/scheduler.inl:1.5 rtems/cpukit/score/inline/rtems/score/scheduler.inl:1.6
--- rtems/cpukit/score/inline/rtems/score/scheduler.inl:1.5 Fri Jun 17 09:31:46 2011
+++ rtems/cpukit/score/inline/rtems/score/scheduler.inl Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -159,6 +159,32 @@
</font> _Scheduler.Operations.extract( the_thread );
}
<font color='#000088'>+/**
+ * @brief Scheduler Priority compare
+ *
+ * This routine compares two priorities.
+ */
+RTEMS_INLINE_ROUTINE int _Scheduler_Priority_compare(
+ Priority_Control p1,
+ Priority_Control p2
+)
+{
+ return _Scheduler.Operations.priority_compare(p1, p2);
+}
+
+/**
+ * @brief Scheduler Release job
+ *
+ * This routine is called when a new period of task is issued.
+ */
+RTEMS_INLINE_ROUTINE void _Scheduler_Release_job(
+ Thread_Control *the_thread,
+ uint32_t length
+)
+{
+ _Scheduler.Operations.release_job(the_thread, length);
+}
+
</font> /** @brief Scheduler Method Invoked at Each Clock Tick
*
* This method is invoked at each clock tick to allow the scheduler
<font color='#006600'>diff -u rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl:1.6 rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl:1.7
--- rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl:1.6 Mon Apr 18 17:01:47 2011
+++ rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -185,6 +185,23 @@
</font> );
}
<font color='#000088'>+/**
+ * @brief Scheduler priority Priority compare body
+ *
+ * This routine implements priority comparison for priority-based
+ * scheduling.
+ *
+ * @return >0 for higher priority, 0 for equal and <0 for lower priority.
+ */
+RTEMS_INLINE_ROUTINE int _Scheduler_priority_Priority_compare_body(
+ Priority_Control p1,
+ Priority_Control p2
+)
+{
+ /* High priority in priority scheduler is represented by low numbers. */
+ return ( p2 - p1 );
+}
+
</font> /**@}*/
#endif
<font color='#006600'>diff -u rtems/cpukit/score/src/coremutexseize.c:1.18 rtems/cpukit/score/src/coremutexseize.c:1.19
--- rtems/cpukit/score/src/coremutexseize.c:1.18 Sun Jul 24 18:55:13 2011
+++ rtems/cpukit/score/src/coremutexseize.c Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -60,7 +60,9 @@
</font>
executing = _Thread_Executing;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) {
<font color='#880000'>- if ( the_mutex->holder->current_priority > executing->current_priority ) {
</font><font color='#000088'>+ if ( _Scheduler_Is_priority_higher_than(
+ executing->current_priority,
+ the_mutex->holder->current_priority)) {
</font> _Thread_Change_priority(
the_mutex->holder,
executing->current_priority,
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/src/schedulerpriorityprioritycompare.c:1.1
--- /dev/null Thu Sep 1 14:12:17 2011
+++ rtems/cpukit/score/src/schedulerpriorityprioritycompare.c Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -0,0 +1,27 @@
</font><font color='#000088'>+/*
+ * 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 );
+}
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/src/schedulerpriorityreleasejob.c:1.1
--- /dev/null Thu Sep 1 14:12:17 2011
+++ rtems/cpukit/score/src/schedulerpriorityreleasejob.c Thu Sep 1 13:13:54 2011
</font><font color='#997700'>@@ -0,0 +1,27 @@
</font><font color='#000088'>+/*
+ * 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;
+}
</font></pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-09-01 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1895/cpukit
* score/src/coretodmsecstoticks.c, score/src/coretodusectoticks.c,
score/src/timespectoticks.c: Ensure time conversions to ticks do not
ignore partial tick and return 1 less than desired.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2911&r2=text&tr2=1.2912&diff_format=h">M</a></td><td width='1%'>1.2912</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/coretodmsecstoticks.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>cpukit/score/src/coretodmsecstoticks.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/coretodusectoticks.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>cpukit/score/src/coretodusectoticks.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/timespectoticks.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/score/src/timespectoticks.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2911 rtems/cpukit/ChangeLog:1.2912
--- rtems/cpukit/ChangeLog:1.2911 Thu Sep 1 13:13:53 2011
+++ rtems/cpukit/ChangeLog Thu Sep 1 13:24:46 2011
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+2011-09-01 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ PR 1895/cpukit
+ * score/src/coretodmsecstoticks.c, score/src/coretodusectoticks.c,
+ score/src/timespectoticks.c: Ensure time conversions to ticks do not
+ ignore partial tick and return 1 less than desired.
+
</font> 2011-09-01 Petr Benes <benesp16@fel.cvut.cz>
PR 1895/cpukit
<font color='#006600'>diff -u rtems/cpukit/score/src/coretodmsecstoticks.c:1.1 rtems/cpukit/score/src/coretodmsecstoticks.c:1.2
--- rtems/cpukit/score/src/coretodmsecstoticks.c:1.1 Tue Dec 16 14:53:33 2008
+++ rtems/cpukit/score/src/coretodmsecstoticks.c Thu Sep 1 13:24:47 2011
</font><font color='#997700'>@@ -1,4 +1,4 @@
</font><font color='#880000'>-/* COPYRIGHT (c) 1989-2008.
</font><font color='#000088'>+/* COPYRIGHT (c) 1989-2011.
</font> * On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
<font color='#997700'>@@ -21,5 +21,18 @@
</font> uint32_t milliseconds
)
{
<font color='#880000'>- return (milliseconds / rtems_configuration_get_milliseconds_per_tick());
</font><font color='#000088'>+ uint32_t ticks;
+ uint32_t milliseconds_per_tick;
+
+ /**
+ * We should ensure the ticks not be truncated by integer division. We
+ * need to have it be greater than or equal to the requested time. It
+ * should not be shorter.
+ */
+ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick();
+ ticks = milliseconds / milliseconds_per_tick;
+ if ( (milliseconds % milliseconds_per_tick) != 0 )
+ ticks += 1;
+
+ return ticks;
</font> }
<font color='#006600'>diff -u rtems/cpukit/score/src/coretodusectoticks.c:1.1 rtems/cpukit/score/src/coretodusectoticks.c:1.2
--- rtems/cpukit/score/src/coretodusectoticks.c:1.1 Tue Dec 16 14:53:34 2008
+++ rtems/cpukit/score/src/coretodusectoticks.c Thu Sep 1 13:24:47 2011
</font><font color='#997700'>@@ -1,4 +1,4 @@
</font><font color='#880000'>-/* COPYRIGHT (c) 1989-2008.
</font><font color='#000088'>+/* COPYRIGHT (c) 1989-2011.
</font> * On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
<font color='#997700'>@@ -21,5 +21,18 @@
</font> uint32_t microseconds
)
{
<font color='#880000'>- return (microseconds / rtems_configuration_get_microseconds_per_tick());
</font><font color='#000088'>+ uint32_t ticks;
+ uint32_t microseconds_per_tick;
+
+ /**
+ * We should ensure the ticks not be truncated by integer division. We
+ * need to have it be greater than or equal to the requested time. It
+ * should not be shorter.
+ */
+ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick();
+ ticks = microseconds / microseconds_per_tick;
+ if ( (microseconds % microseconds_per_tick) != 0 )
+ ticks += 1;
+
+ return ticks;
</font> }
<font color='#006600'>diff -u rtems/cpukit/score/src/timespectoticks.c:1.3 rtems/cpukit/score/src/timespectoticks.c:1.4
--- rtems/cpukit/score/src/timespectoticks.c:1.3 Sun Nov 29 07:51:52 2009
+++ rtems/cpukit/score/src/timespectoticks.c Thu Sep 1 13:24:47 2011
</font><font color='#997700'>@@ -35,16 +35,22 @@
</font> )
{
uint32_t ticks;
<font color='#000088'>+ uint32_t nanoseconds_per_tick;
</font>
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
return 0;
<font color='#880000'>- ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
</font><font color='#000088'>+ /**
+ * We should ensure the ticks not be truncated by integer division. We
+ * need to have it be greater than or equal to the requested time. It
+ * should not be shorter.
+ */
+ ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
+ nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick();
+ ticks += time->tv_nsec / nanoseconds_per_tick;
</font>
<font color='#880000'>- ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
</font><font color='#000088'>+ if ( (time->tv_nsec % nanoseconds_per_tick) != 0 )
+ ticks += 1;
</font>
<font color='#880000'>- if (ticks)
- return ticks;
-
- return 1;
</font><font color='#000088'>+ return ticks;
</font> }
</pre>
<p> </p>
<a name='cs3'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
<font color='#225522'><em>(on branch rtems-4-10-branch)</em></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-09-01 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1895/cpukit
* posix/src/mqueuerecvsupp.c, posix/src/pthreadjoin.c,
score/src/coretodmsecstoticks.c, score/src/coretodusectoticks.c,
score/src/timespectoticks.c: Ensure time conversions to ticks do not
ignore partial tick and return 1 less than desired.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2346.2.101&r2=text&tr2=1.2346.2.102&diff_format=h">M</a></td><td width='1%'>1.2346.2.102</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/mqueuerecvsupp.c.diff?r1=text&tr1=1.18&r2=text&tr2=1.18.2.1&diff_format=h">M</a></td><td width='1%'>1.18.2.1</td><td width='100%'>cpukit/posix/src/mqueuerecvsupp.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/pthreadjoin.c.diff?r1=text&tr1=1.8.4.3&r2=text&tr2=1.8.4.4&diff_format=h">M</a></td><td width='1%'>1.8.4.4</td><td width='100%'>cpukit/posix/src/pthreadjoin.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/coretodmsecstoticks.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.1.2.1&diff_format=h">M</a></td><td width='1%'>1.1.2.1</td><td width='100%'>cpukit/score/src/coretodmsecstoticks.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/coretodusectoticks.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.1.2.1&diff_format=h">M</a></td><td width='1%'>1.1.2.1</td><td width='100%'>cpukit/score/src/coretodusectoticks.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/timespectoticks.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.3.2.1&diff_format=h">M</a></td><td width='1%'>1.3.2.1</td><td width='100%'>cpukit/score/src/timespectoticks.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2346.2.101 rtems/cpukit/ChangeLog:1.2346.2.102
--- rtems/cpukit/ChangeLog:1.2346.2.101 Sun Jul 31 17:40:41 2011
+++ rtems/cpukit/ChangeLog Thu Sep 1 13:24:54 2011
</font><font color='#997700'>@@ -1,3 +1,11 @@
</font><font color='#000088'>+2011-09-01 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ PR 1895/cpukit
+ * posix/src/mqueuerecvsupp.c, posix/src/pthreadjoin.c,
+ score/src/coretodmsecstoticks.c, score/src/coretodusectoticks.c,
+ score/src/timespectoticks.c: Ensure time conversions to ticks do not
+ ignore partial tick and return 1 less than desired.
+
</font> 2011-07-31 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1855/cpukit
<font color='#006600'>diff -u rtems/cpukit/posix/src/mqueuerecvsupp.c:1.18 rtems/cpukit/posix/src/mqueuerecvsupp.c:1.18.2.1
--- rtems/cpukit/posix/src/mqueuerecvsupp.c:1.18 Tue Feb 3 04:10:48 2009
+++ rtems/cpukit/posix/src/mqueuerecvsupp.c Thu Sep 1 13:24:57 2011
</font><font color='#997700'>@@ -11,7 +11,7 @@
</font> * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
* time.
*
<font color='#880000'>- * COPYRIGHT (c) 1989-2008.
</font><font color='#000088'>+ * COPYRIGHT (c) 1989-2011.
</font> * On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
<font color='#997700'>@@ -105,8 +105,11 @@
</font> );
_Thread_Enable_dispatch();
<font color='#880000'>- *msg_prio =
- _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
</font><font color='#000088'>+ if (msg_prio) {
+ *msg_prio = _POSIX_Message_queue_Priority_from_core(
+ _Thread_Executing->Wait.count
+ );
+ }
</font>
if ( !_Thread_Executing->Wait.return_code )
return length_out;
<font color='#006600'>diff -u rtems/cpukit/posix/src/pthreadjoin.c:1.8.4.3 rtems/cpukit/posix/src/pthreadjoin.c:1.8.4.4
--- rtems/cpukit/posix/src/pthreadjoin.c:1.8.4.3 Sun Jul 31 17:40:43 2011
+++ rtems/cpukit/posix/src/pthreadjoin.c Thu Sep 1 13:24:57 2011
</font><font color='#997700'>@@ -55,20 +55,21 @@
</font>
if ( the_thread->current_state ==
(STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT) ) {
<font color='#880000'>- return_pointer = the_thread->Wait.return_argument;
- _Thread_Clear_state(
- the_thread,
- (STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT)
- );
</font><font color='#000088'>+ return_pointer = the_thread->Wait.return_argument;
+ _Thread_Clear_state(
+ the_thread,
+ (STATES_WAITING_FOR_JOIN_AT_EXIT | STATES_TRANSIENT)
+ );
+ _Thread_Enable_dispatch();
</font> } else {
<font color='#880000'>- _Thread_Executing->Wait.return_argument = &return_pointer;
</font><font color='#000088'>+ _Thread_Executing->Wait.return_argument = &return_pointer;
</font> _Thread_queue_Enter_critical_section( &api->Join_List );
_Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
<font color='#880000'>- }
- _Thread_Enable_dispatch();
</font><font color='#000088'>+ _Thread_Enable_dispatch();
</font>
<font color='#880000'>- if ( _Thread_Executing->Wait.return_code == EINTR )
- goto on_EINTR;
</font><font color='#000088'>+ if ( _Thread_Executing->Wait.return_code == EINTR )
+ goto on_EINTR;
+ }
</font>
if ( value_ptr )
*value_ptr = return_pointer;
<font color='#006600'>diff -u rtems/cpukit/score/src/coretodmsecstoticks.c:1.1 rtems/cpukit/score/src/coretodmsecstoticks.c:1.1.2.1
--- rtems/cpukit/score/src/coretodmsecstoticks.c:1.1 Tue Dec 16 14:53:33 2008
+++ rtems/cpukit/score/src/coretodmsecstoticks.c Thu Sep 1 13:24:57 2011
</font><font color='#997700'>@@ -1,4 +1,4 @@
</font><font color='#880000'>-/* COPYRIGHT (c) 1989-2008.
</font><font color='#000088'>+/* COPYRIGHT (c) 1989-2011.
</font> * On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
<font color='#997700'>@@ -21,5 +21,18 @@
</font> uint32_t milliseconds
)
{
<font color='#880000'>- return (milliseconds / rtems_configuration_get_milliseconds_per_tick());
</font><font color='#000088'>+ uint32_t ticks;
+ uint32_t milliseconds_per_tick;
+
+ /**
+ * We should ensure the ticks not be truncated by integer division. We
+ * need to have it be greater than or equal to the requested time. It
+ * should not be shorter.
+ */
+ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick();
+ ticks = milliseconds / milliseconds_per_tick;
+ if ( (milliseconds % milliseconds_per_tick) != 0 )
+ ticks += 1;
+
+ return ticks;
</font> }
<font color='#006600'>diff -u rtems/cpukit/score/src/coretodusectoticks.c:1.1 rtems/cpukit/score/src/coretodusectoticks.c:1.1.2.1
--- rtems/cpukit/score/src/coretodusectoticks.c:1.1 Tue Dec 16 14:53:34 2008
+++ rtems/cpukit/score/src/coretodusectoticks.c Thu Sep 1 13:24:57 2011
</font><font color='#997700'>@@ -1,4 +1,4 @@
</font><font color='#880000'>-/* COPYRIGHT (c) 1989-2008.
</font><font color='#000088'>+/* COPYRIGHT (c) 1989-2011.
</font> * On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
<font color='#997700'>@@ -21,5 +21,18 @@
</font> uint32_t microseconds
)
{
<font color='#880000'>- return (microseconds / rtems_configuration_get_microseconds_per_tick());
</font><font color='#000088'>+ uint32_t ticks;
+ uint32_t microseconds_per_tick;
+
+ /**
+ * We should ensure the ticks not be truncated by integer division. We
+ * need to have it be greater than or equal to the requested time. It
+ * should not be shorter.
+ */
+ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick();
+ ticks = microseconds / microseconds_per_tick;
+ if ( (microseconds % microseconds_per_tick) != 0 )
+ ticks += 1;
+
+ return ticks;
</font> }
<font color='#006600'>diff -u rtems/cpukit/score/src/timespectoticks.c:1.3 rtems/cpukit/score/src/timespectoticks.c:1.3.2.1
--- rtems/cpukit/score/src/timespectoticks.c:1.3 Sun Nov 29 07:51:52 2009
+++ rtems/cpukit/score/src/timespectoticks.c Thu Sep 1 13:24:57 2011
</font><font color='#997700'>@@ -35,16 +35,22 @@
</font> )
{
uint32_t ticks;
<font color='#000088'>+ uint32_t nanoseconds_per_tick;
</font>
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
return 0;
<font color='#880000'>- ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
</font><font color='#000088'>+ /**
+ * We should ensure the ticks not be truncated by integer division. We
+ * need to have it be greater than or equal to the requested time. It
+ * should not be shorter.
+ */
+ ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
+ nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick();
+ ticks += time->tv_nsec / nanoseconds_per_tick;
</font>
<font color='#880000'>- ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
</font><font color='#000088'>+ if ( (time->tv_nsec % nanoseconds_per_tick) != 0 )
+ ticks += 1;
</font>
<font color='#880000'>- if (ticks)
- return ticks;
-
- return 1;
</font><font color='#000088'>+ return ticks;
</font> }
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>