<!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-03-16)</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-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>
PR 1743/cpu
* sapi/include/confdefs.h, score/Makefile.am, score/preinstall.am: Add
Simple Priority Scheduler as complement to existing Deterministic
Priority Scheduler. This scheduler serves both as an example and as a
lighter weight implementation for smaller systems.
* score/include/rtems/score/schedulersimple.h,
score/inline/rtems/score/schedulersimple.inl,
score/src/schedulersimple.c, score/src/schedulersimpleblock.c,
score/src/schedulersimpleenqueue.c,
score/src/schedulersimpleenqueuefirst.c,
score/src/schedulersimpleextract.c,
score/src/schedulersimplereadyqueueenqueue.c,
score/src/schedulersimplereadyqueueenqueuefirst.c,
score/src/schedulersimpleschedule.c,
score/src/schedulersimpleunblock.c, score/src/schedulersimpleyield.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.2783&r2=text&tr2=1.2784&diff_format=h">M</a></td><td width='1%'>1.2784</td><td width='100%'>cpukit/ChangeLog</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.159&r2=text&tr2=1.160&diff_format=h">M</a></td><td width='1%'>1.160</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.92&r2=text&tr2=1.93&diff_format=h">M</a></td><td width='1%'>1.93</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/schedulersimple.h?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/include/rtems/score/schedulersimple.h</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/inline/rtems/score/schedulersimple.inl?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/inline/rtems/score/schedulersimple.inl</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/preinstall.am.diff?r1=text&tr1=1.25&r2=text&tr2=1.26&diff_format=h">M</a></td><td width='1%'>1.26</td><td width='100%'>cpukit/score/preinstall.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulersimple.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/schedulersimple.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulersimpleblock.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/schedulersimpleblock.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulersimpleenqueue.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/schedulersimpleenqueue.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulersimpleenqueuefirst.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/schedulersimpleenqueuefirst.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulersimpleextract.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/schedulersimpleextract.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulersimplereadyqueueenqueue.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/schedulersimplereadyqueueenqueue.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulersimplereadyqueueenqueuefirst.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/schedulersimplereadyqueueenqueuefirst.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulersimpleschedule.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/schedulersimpleschedule.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulersimpleunblock.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/schedulersimpleunblock.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulersimpleyield.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/schedulersimpleyield.c</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2783 rtems/cpukit/ChangeLog:1.2784
--- rtems/cpukit/ChangeLog:1.2783 Wed Mar 16 08:26:32 2011
+++ rtems/cpukit/ChangeLog Wed Mar 16 11:31:51 2011
</font><font color='#997700'>@@ -1,3 +1,22 @@
</font><font color='#000088'>+2011-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>
+
+ PR 1743/cpu
+ * sapi/include/confdefs.h, score/Makefile.am, score/preinstall.am: Add
+ Simple Priority Scheduler as complement to existing Deterministic
+ Priority Scheduler. This scheduler serves both as an example and as a
+ lighter weight implementation for smaller systems.
+ * score/include/rtems/score/schedulersimple.h,
+ score/inline/rtems/score/schedulersimple.inl,
+ score/src/schedulersimple.c, score/src/schedulersimpleblock.c,
+ score/src/schedulersimpleenqueue.c,
+ score/src/schedulersimpleenqueuefirst.c,
+ score/src/schedulersimpleextract.c,
+ score/src/schedulersimplereadyqueueenqueue.c,
+ score/src/schedulersimplereadyqueueenqueuefirst.c,
+ score/src/schedulersimpleschedule.c,
+ score/src/schedulersimpleunblock.c, score/src/schedulersimpleyield.c:
+ New files.
+
</font> 2011-03-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/src/threadyieldprocessor.c: Removed. File is no longer
<font color='#006600'>diff -u rtems/cpukit/sapi/include/confdefs.h:1.159 rtems/cpukit/sapi/include/confdefs.h:1.160
--- rtems/cpukit/sapi/include/confdefs.h:1.159 Thu Mar 3 10:01:35 2011
+++ rtems/cpukit/sapi/include/confdefs.h Wed Mar 16 11:31:51 2011
</font><font color='#997700'>@@ -556,6 +556,7 @@
</font> * scheduling policy to use. The supported configurations are:
* CONFIGURE_SCHEDULER_USER - user provided scheduler
* CONFIGURE_SCHEDULER_PRIORITY - Deterministic Priority Scheduler
<font color='#000088'>+ * CONFIGURE_SCHEDULER_SIMPLE - Light-weight Priority Scheduler
</font> *<span style="background-color: #FF0000"> </span>
* If no configuration is specified by the application, then<span style="background-color: #FF0000"> </span>
* CONFIGURE_SCHEDULER_PRIORITY is assumed to be the default.
<font color='#997700'>@@ -575,7 +576,8 @@
</font>
/* If no scheduler is specified, the priority scheduler is default. */
#if !defined(CONFIGURE_SCHEDULER_USER) && \
<font color='#880000'>- !defined(CONFIGURE_SCHEDULER_PRIORITY)
</font><font color='#000088'>+ !defined(CONFIGURE_SCHEDULER_PRIORITY) && \
+ !defined(CONFIGURE_SCHEDULER_SIMPLE)
</font> #define CONFIGURE_SCHEDULER_PRIORITY
#endif
<font color='#997700'>@@ -598,6 +600,22 @@
</font> #endif
/*<span style="background-color: #FF0000"> </span>
<font color='#000088'>+ * If the Simple Priority Scheduler is selected, then configure for it.
+ */
+#if defined(CONFIGURE_SCHEDULER_SIMPLE)
+ #include <rtems/score/schedulersimple.h>
+ #define SCHEDULER_ENTRY_POINTS SCHEDULER_SIMPLE_ENTRY_POINTS
+
+ /**
+ * define the memory used by the simple scheduler
+ */
+ #define CONFIGURE_MEMORY_FOR_SCHEDULER ( \
+ _Configure_From_workspace( sizeof(Chain_Control) ) \
+ )
+ #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER (0)
+#endif
+
+/*<span style="background-color: #FF0000"> </span>
</font> * Set up the scheduler entry points table. The scheduling code uses
* this code to know which scheduler is configured by the user.
*/
<font color='#006600'>diff -u rtems/cpukit/score/Makefile.am:1.92 rtems/cpukit/score/Makefile.am:1.93
--- rtems/cpukit/score/Makefile.am:1.92 Tue Mar 15 14:27:46 2011
+++ rtems/cpukit/score/Makefile.am Wed Mar 16 11:32:21 2011
</font><font color='#997700'>@@ -27,6 +27,7 @@
</font> include/rtems/score/object.h include/rtems/score/percpu.h \
include/rtems/score/priority.h include/rtems/score/prioritybitmap.h \
include/rtems/score/scheduler.h include/rtems/score/schedulerpriority.h \
<font color='#000088'>+ include/rtems/score/schedulersimple.h \
</font> include/rtems/score/stack.h include/rtems/score/states.h \
include/rtems/score/sysstate.h include/rtems/score/thread.h \
include/rtems/score/threadq.h include/rtems/score/threadsync.h \
<font color='#997700'>@@ -56,6 +57,7 @@
</font> inline/rtems/score/isr.inl inline/rtems/score/object.inl \
inline/rtems/score/priority.inl inline/rtems/score/prioritybitmap.inl \
inline/rtems/score/scheduler.inl inline/rtems/score/schedulerpriority.inl \
<font color='#000088'>+ inline/rtems/score/schedulersimple.inl \
</font> inline/rtems/score/stack.inl inline/rtems/score/states.inl \
inline/rtems/score/sysstate.inl inline/rtems/score/thread.inl \
inline/rtems/score/threadq.inl inline/rtems/score/tod.inl \
<font color='#997700'>@@ -155,6 +157,18 @@
</font> src/schedulerpriorityupdate.c \
src/schedulerpriorityyield.c
<font color='#000088'>+## SCHEDULERSIMPLE_C_FILES
+libscore_a_SOURCES += src/schedulersimple.c \
+ src/schedulersimpleblock.c \
+ src/schedulersimpleenqueue.c \
+ src/schedulersimpleenqueuefirst.c \
+ src/schedulersimpleextract.c \
+ src/schedulersimplereadyqueueenqueue.c \
+ src/schedulersimplereadyqueueenqueuefirst.c \
+ src/schedulersimpleschedule.c \
+ src/schedulersimpleunblock.c \
+ src/schedulersimpleyield.c<span style="background-color: #FF0000"> </span>
+
</font> ## PROTECTED_HEAP_C_FILES
libscore_a_SOURCES += src/pheapallocate.c \
src/pheapextend.c src/pheapfree.c src/pheapgetsize.c \
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/include/rtems/score/schedulersimple.h:1.1
--- /dev/null Wed Mar 16 12:10:13 2011
+++ rtems/cpukit/score/include/rtems/score/schedulersimple.h Wed Mar 16 11:32:21 2011
</font><font color='#997700'>@@ -0,0 +1,199 @@
</font><font color='#000088'>+/**
+ * @file rtems/score/schedulersimple.h
+ *
+ * This include file contains all the constants and structures associated
+ * with the manipulation of threads on a simple-priority-based ready queue.
+ *
+ *
+ * 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$
+ */
+
+#ifndef _RTEMS_SCORE_SCHEDULERSIMPLE_H
+#define _RTEMS_SCORE_SCHEDULERSIMPLE_H
+
+/**
+ * @addtogroup ScoreScheduler
+ *
+ */
+/**@{*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rtems/score/scheduler.h>
+
+/**
+ * Entry points for Scheduler Simple
+ */
+#define SCHEDULER_SIMPLE_ENTRY_POINTS \
+ { \
+ _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 */ \
+ }
+
+/**
+ * This routine initializes the simple scheduler.
+ */
+void _Scheduler_simple_Initialize( void );
+
+/**
+ * This routine sets the heir thread to be the next ready thread<span style="background-color: #FF0000"> </span>
+ * on the ready queue by getting the first node in the scheduler
+ * information.
+ */
+void _Scheduler_simple_Schedule( void );
+
+/**
+ * This routine is invoked when a thread wishes to voluntarily
+ * transfer control of the processor to another thread in the queue.
+ * It will remove the running THREAD from the scheduler.informaiton<span style="background-color: #FF0000"> </span>
+ * (where the ready queue is stored) and place it immediately at the<span style="background-color: #FF0000"> </span>
+ * between the last entry of its priority and the next priority thread.<span style="background-color: #FF0000"> </span>
+ * Reset timeslice and yield the processor functions both use this routine,<span style="background-color: #FF0000"> </span>
+ * therefore if reset is true and this is the only thread on the queue then<span style="background-color: #FF0000"> </span>
+ * the timeslice counter is reset. The heir THREAD will be updated if the
+ * running is also the currently the heir.
+*/
+void _Scheduler_simple_Yield( void );
+
+/**
+ * This routine removes @a the_thread from the scheduling decision,<span style="background-color: #FF0000"> </span>
+ * that is, removes it from the ready queue. It performs
+ * any necessary scheduling operations including the selection of
+ * a new heir thread.
+ *
+ * @param[in] the_thread is the thread that is to be blocked
+ */
+void _Scheduler_simple_Block(<span style="background-color: #FF0000"> </span>
+ Thread_Control *the_thread<span style="background-color: #FF0000"> </span>
+);
+
+/**
+ * This routine adds @a the_thread to the scheduling decision,<span style="background-color: #FF0000"> </span>
+ * that is, adds it to the ready queue and<span style="background-color: #FF0000"> </span>
+ * updates any appropriate scheduling variables, for example the heir thread.
+ *
+ * @param[in] the_thread is the thread that is to be unblocked
+ */
+void _Scheduler_simple_Unblock(
+ Thread_Control *the_thread<span style="background-color: #FF0000"> </span>
+);
+
+/**
+ * This routine removes a specific thread from the specified<span style="background-color: #FF0000"> </span>
+ * simple-based ready queue.
+ *
+ * @param[in] the_thread is the thread to be blocked
+ */
+void _Scheduler_simple_Extract(
+ Thread_Control *the_thread
+);
+
+/**
+ * This routine puts @a the_thread on to the ready queue.
+ *
+ * @param[in] the_thread is the thread to be blocked
+ */
+void _Scheduler_simple_Enqueue(
+ Thread_Control *the_thread
+);
+
+/**
+ * This routine puts @a the_thread to the head of the ready queue.<span style="background-color: #FF0000"> </span>
+ * The thread will be the first thread at its priority level.
+ *
+ * @param[in] the_thread is the thread to be blocked
+ */
+void _Scheduler_simple_Enqueue_first(
+ Thread_Control *the_thread
+);
+
+/**
+ * This routine is a place holder for any memeory allocation needed
+ * by the scheduler. For the simple scheduler the routine is an empty
+ * place holder.
+ *
+ * @param[in] the_thread is the thread the scheduler is allocating
+ * management memory for
+ *
+ * @return this routine returns -1 since this is just an empty placeholder
+ * and the return value may be defined differently by each scheduler.
+ */
+void *_Scheduler_simple_Allocate(<span style="background-color: #FF0000"> </span>
+ Thread_Control *the_thread
+);
+
+/**
+ * This routine does nothing, and is used as a stub for Schedule update
+ *
+ * The overhead of a function call will still be imposed.
+ *
+ * @param[in] the_thread is the thread to be blocked
+ */
+void _Scheduler_simple_Update(<span style="background-color: #FF0000"> </span>
+ Thread_Control *the_thread
+);
+
+/**
+ * This routine does nothing, and is used as a stub for Schedule free
+ *
+ * The overhead of a function call will still be imposed.
+ *
+ * @param[in] the_thread is the thread to be blocked
+ */
+void _Scheduler_simple_Free(<span style="background-color: #FF0000"> </span>
+ Thread_Control *the_thread
+);
+
+/**
+ * _Scheduler_simple_Ready_queue_Enqueue
+ *
+ * This routine puts @a the_thread on the ready queue
+ * at the end of its priority group.
+ *<span style="background-color: #FF0000"> </span>
+ * @param[in] the_thread - pointer to a thread control block
+ */
+void _Scheduler_simple_Ready_queue_Enqueue(
+ Thread_Control *the_thread
+);
+
+/**
+ * _Scheduler_simple_Ready_queue_Enqueue_first
+ *
+ * This routine puts @a the_thread on to the ready queue
+ * at the beginning of its priority group.
+ *<span style="background-color: #FF0000"> </span>
+ * @param[in] the_thread - pointer to a thread control block
+ */
+void _Scheduler_simple_Ready_queue_Enqueue_first(
+ Thread_Control *the_thread
+);
+
+#ifndef __RTEMS_APPLICATION__
+#include <rtems/score/schedulersimple.inl>
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/**@}*/
+
+#endif
+/* end of include file */
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/inline/rtems/score/schedulersimple.inl:1.1
--- /dev/null Wed Mar 16 12:10:14 2011
+++ rtems/cpukit/score/inline/rtems/score/schedulersimple.inl Wed Mar 16 11:32:21 2011
</font><font color='#997700'>@@ -0,0 +1,53 @@
</font><font color='#000088'>+/**<span style="background-color: #FF0000"> </span>
+ * @file rtems/score/schedulersimple.inl
+ *
+ * This inline file contains all of the inlined routines associated with
+ * the manipulation of the priority-based scheduling structures.
+ */
+
+/*
+ * 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$
+ */
+
+#ifndef _RTEMS_SCORE_SCHEDULERSIMPLE_H
+# error "Never use <rtems/score/schedulersimple.inl> directly; include <rtems/score/schedulersimple.h> instead."
+#endif
+
+#ifndef _RTEMS_SCORE_SCHEDULERSIMPLE_INL
+#define _RTEMS_SCORE_SCHEDULERSIMPLE_INL
+
+#include <rtems/score/thread.h>
+
+/**
+ * @addtogroup ScoreScheduler
+ * @{
+ */
+
+/**
+ * This routine puts @a the_thread on to the ready queue.
+ *
+ * @param[in] the_ready_queue is a pointer to the ready queue head
+ * @param[in] the_thread is the thread to be blocked
+ */
+RTEMS_INLINE_ROUTINE void _Scheduler_simple_Ready_queue_Requeue(
+ Scheduler_Control *the_ready_queue,
+ Thread_Control *the_thread
+)
+{
+ /* extract */
+ _Chain_Extract_unprotected( &the_thread->Object.Node );
+
+ /* enqueue */
+ _Scheduler_simple_Ready_queue_Enqueue( the_thread );
+}
+
+/**@}*/
+
+#endif
+/* end of include file */
</font>
<font color='#006600'>diff -u rtems/cpukit/score/preinstall.am:1.25 rtems/cpukit/score/preinstall.am:1.26
--- rtems/cpukit/score/preinstall.am:1.25 Wed Nov 24 09:51:27 2010
+++ rtems/cpukit/score/preinstall.am Wed Mar 16 11:32:21 2011
</font><font color='#997700'>@@ -119,6 +119,10 @@
</font> $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulerpriority.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulerpriority.h
<font color='#000088'>+$(PROJECT_INCLUDE)/rtems/score/schedulersimple.h: include/rtems/score/schedulersimple.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulersimple.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulersimple.h
+
</font> $(PROJECT_INCLUDE)/rtems/score/stack.h: include/rtems/score/stack.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/stack.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/stack.h
<font color='#997700'>@@ -261,6 +265,10 @@
</font> $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulerpriority.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulerpriority.inl
<font color='#000088'>+$(PROJECT_INCLUDE)/rtems/score/schedulersimple.inl: inline/rtems/score/schedulersimple.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulersimple.inl
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulersimple.inl
+
</font> $(PROJECT_INCLUDE)/rtems/score/stack.inl: inline/rtems/score/stack.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/stack.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/stack.inl
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/src/schedulersimple.c:1.1
--- /dev/null Wed Mar 16 12:10:14 2011
+++ rtems/cpukit/score/src/schedulersimple.c Wed Mar 16 11:32:21 2011
</font><font color='#997700'>@@ -0,0 +1,84 @@
</font><font color='#000088'>+/*
+ * Scheduler Simple Handler / Initialize
+ * Scheduler Simple Handler / Allocate (Empty Routine)
+ * Scheduler Simple Handler / Update (Empty Routine)
+ * Scheduler Simple Handler / Free (Empty Routine)
+ *
+ * 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/scheduler.h>
+#include <rtems/score/schedulersimple.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/wkspace.h>
+
+/**
+ * This routine does nothing, and is used as a stub for Schedule allocate
+ *
+ * Note: returns a non-zero value, or else thread initialize thinks the<span style="background-color: #FF0000"> </span>
+ * allocation failed.
+ *
+ * The overhead of a function call will still be imposed.
+ */
+void * _Scheduler_simple_Allocate(<span style="background-color: #FF0000"> </span>
+ Thread_Control *the_thread
+)
+{
+ return (void*)-1; /* maybe pick an appropriate poison value */
+}
+
+
+/**
+ * This routine does nothing, and is used as a stub for Schedule update
+ *
+ * The overhead of a function call will still be imposed.
+ */
+void _Scheduler_simple_Update(<span style="background-color: #FF0000"> </span>
+ Thread_Control *the_thread
+)
+{
+}
+
+/**
+ * This routine does nothing, and is used as a stub for Schedule free
+ *
+ * The overhead of a function call will still be imposed.
+ */
+void _Scheduler_simple_Free(<span style="background-color: #FF0000"> </span>
+ Thread_Control *the_thread
+)
+{
+}
+
+/**
+ * This routine initializes the simple scheduler.
+ */
+void _Scheduler_simple_Initialize ( void )
+{
+ void *f;
+
+ /*<span style="background-color: #FF0000"> </span>
+ * Initialize Ready Queue
+ */
+
+ /* allocate ready queue structures */
+ f = _Workspace_Allocate_or_fatal_error( sizeof(Chain_Control) );
+ _Scheduler.information = f;
+
+ /* initialize ready queue structure */
+ _Chain_Initialize_empty( (Chain_Control *)f );
+}
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/src/schedulersimpleblock.c:1.1
--- /dev/null Wed Mar 16 12:10:14 2011
+++ rtems/cpukit/score/src/schedulersimpleblock.c Wed Mar 16 11:32:21 2011
</font><font color='#997700'>@@ -0,0 +1,39 @@
</font><font color='#000088'>+/*
+ * Scheduler Simple Handler / Block
+ *
+ * COPYRIGHT (c) 2011.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in 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/score/context.h>
+#include <rtems/score/interr.h>
+#include <rtems/score/isr.h>
+#include <rtems/score/object.h>
+#include <rtems/score/priority.h>
+#include <rtems/score/scheduler.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/schedulersimple.h>
+
+void _Scheduler_simple_Block(
+ Thread_Control *the_thread
+)
+{
+ _Scheduler_simple_Extract(the_thread);
+
+ if ( _Thread_Is_heir( the_thread ) )
+ _Scheduler_simple_Schedule();
+
+ if ( _Thread_Is_executing( the_thread ) )
+ _Thread_Dispatch_necessary = true;
+}
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/src/schedulersimpleenqueue.c:1.1
--- /dev/null Wed Mar 16 12:10:14 2011
+++ rtems/cpukit/score/src/schedulersimpleenqueue.c Wed Mar 16 11:32:22 2011
</font><font color='#997700'>@@ -0,0 +1,29 @@
</font><font color='#000088'>+/*
+ * Schedule Simple Handler / Enqueue
+ *
+ * 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/score/chain.h>
+#include <rtems/score/isr.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/schedulersimple.h>
+
+void _Scheduler_simple_Enqueue(
+ Thread_Control *the_thread
+)
+{
+ _Scheduler_simple_Ready_queue_Enqueue( the_thread );
+}
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/src/schedulersimpleenqueuefirst.c:1.1
--- /dev/null Wed Mar 16 12:10:14 2011
+++ rtems/cpukit/score/src/schedulersimpleenqueuefirst.c Wed Mar 16 11:32:22 2011
</font><font color='#997700'>@@ -0,0 +1,28 @@
</font><font color='#000088'>+/*
+ * Schedule Simple Handler / Enqueue First
+ *
+ * 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/score/chain.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/schedulersimple.h>
+
+void _Scheduler_simple_Enqueue_first(
+ Thread_Control *the_thread
+)
+{
+ _Scheduler_simple_Ready_queue_Enqueue_first( the_thread );
+}
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/src/schedulersimpleextract.c:1.1
--- /dev/null Wed Mar 16 12:10:14 2011
+++ rtems/cpukit/score/src/schedulersimpleextract.c Wed Mar 16 11:32:22 2011
</font><font color='#997700'>@@ -0,0 +1,28 @@
</font><font color='#000088'>+/*
+ * Schedule Simple Handler / Extract<span style="background-color: #FF0000"> </span>
+ *
+ * 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/score/chain.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/schedulersimple.h>
+
+void _Scheduler_simple_Extract(
+ Thread_Control *the_thread
+)
+{
+ _Chain_Extract_unprotected( &the_thread->Object.Node );
+}
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/src/schedulersimplereadyqueueenqueue.c:1.1
--- /dev/null Wed Mar 16 12:10:14 2011
+++ rtems/cpukit/score/src/schedulersimplereadyqueueenqueue.c Wed Mar 16 11:32:22 2011
</font><font color='#997700'>@@ -0,0 +1,48 @@
</font><font color='#000088'>+/*
+ * Schedule Simple Handler / Ready Queue Enqueue
+ *
+ * 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/score/chain.h>
+#include <rtems/score/isr.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/schedulersimple.h>
+
+void _Scheduler_simple_Ready_queue_Enqueue(
+ Thread_Control *the_thread
+)
+{
+ Chain_Control *ready;
+ Chain_Node *the_node;
+ Thread_Control *current;
+
+ ready = (Chain_Control *)_Scheduler.information;
+ the_node = _Chain_First( ready );
+ current = (Thread_Control *)ready;
+
+ for ( ; !_Chain_Is_tail( ready, the_node ) ; the_node = the_node->next ) {
+ current = (Thread_Control *) the_node;
+
+ /* break when AT END OR PAST our priority */
+ if ( the_thread->current_priority < current->current_priority ) {
+ current = (Thread_Control *)current->Object.Node.previous;
+ break;
+ }
+ }
+
+ /* enqueue */
+ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
+}
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/src/schedulersimplereadyqueueenqueuefirst.c:1.1
--- /dev/null Wed Mar 16 12:10:14 2011
+++ rtems/cpukit/score/src/schedulersimplereadyqueueenqueuefirst.c Wed Mar 16 11:32:22 2011
</font><font color='#997700'>@@ -0,0 +1,52 @@
</font><font color='#000088'>+/*
+ * Schedule Simple Handler / Ready Queue Enqueue First
+ *
+ * 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/score/chain.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/schedulersimple.h>
+
+void _Scheduler_simple_Ready_queue_Enqueue_first(
+ Thread_Control *the_thread
+)
+{
+ Chain_Control *ready;
+ Chain_Node *the_node;
+ Thread_Control *current;
+
+ ready = (Chain_Control *)_Scheduler.information;
+ current = (Thread_Control *)ready;
+
+ /*
+ * Do NOT need to check for end of chain because there is always
+ * at least one task on the ready chain -- the IDLE task. It can
+ * never block, should never attempt to obtain a semaphore or mutex,
+ * and thus will always be there.
+ */
+ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
+ current = (Thread_Control *) the_node;
+
+ /* break when AT HEAD OF (or PAST) our priority */
+ if ( the_thread->current_priority <= current->current_priority ) {
+ current = (Thread_Control *)current->Object.Node.previous;
+ break;
+ }
+ }
+
+ /* enqueue */
+ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
+}
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/src/schedulersimpleschedule.c:1.1
--- /dev/null Wed Mar 16 12:10:14 2011
+++ rtems/cpukit/score/src/schedulersimpleschedule.c Wed Mar 16 11:32:22 2011
</font><font color='#997700'>@@ -0,0 +1,34 @@
</font><font color='#000088'>+/*
+ * Scheduler Simple Handler / Schedule
+ *
+ * COPYRIGHT (c) 2011.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in 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/score/context.h>
+#include <rtems/score/interr.h>
+#include <rtems/score/isr.h>
+#include <rtems/score/object.h>
+#include <rtems/score/priority.h>
+#include <rtems/score/percpu.h>
+#include <rtems/score/scheduler.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/schedulersimple.h>
+
+void _Scheduler_simple_Schedule(void)
+{
+ _Thread_Heir = (Thread_Control *) _Chain_First(<span style="background-color: #FF0000"> </span>
+ (Chain_Control *) _Scheduler.information<span style="background-color: #FF0000"> </span>
+ );
+}
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/src/schedulersimpleunblock.c:1.1
--- /dev/null Wed Mar 16 12:10:14 2011
+++ rtems/cpukit/score/src/schedulersimpleunblock.c Wed Mar 16 11:32:22 2011
</font><font color='#997700'>@@ -0,0 +1,47 @@
</font><font color='#000088'>+/*
+ * Scheduler Simple Handler / Unblock
+ *
+ * COPYRIGHT (c) 2011.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in 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/score/isr.h>
+#include <rtems/score/schedulersimple.h>
+#include <rtems/score/thread.h>
+
+void _Scheduler_simple_Unblock(
+ Thread_Control *the_thread
+)
+{
+ _Scheduler_simple_Ready_queue_Enqueue(the_thread);
+
+ /*
+ * If the thread that was unblocked is more important than the heir,
+ * then we have a new heir. This may or may not result in a
+ * context switch.
+ *
+ * Normal case:
+ * If the current thread is preemptible, then we need to do
+ * a context switch.
+ * Pseudo-ISR case:
+ * Even if the thread isn't preemptible, if the new heir is
+ * a pseudo-ISR system task, we need to do a context switch.
+ */
+ if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
+ _Thread_Heir = the_thread;
+ if ( _Thread_Executing->is_preemptible ||
+ the_thread->current_priority == 0 )
+ _Thread_Dispatch_necessary = true;
+ }
+}
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/score/src/schedulersimpleyield.c:1.1
--- /dev/null Wed Mar 16 12:10:15 2011
+++ rtems/cpukit/score/src/schedulersimpleyield.c Wed Mar 16 11:32:22 2011
</font><font color='#997700'>@@ -0,0 +1,42 @@
</font><font color='#000088'>+/*
+ * Scheduler Simple Handler / Yield
+ *
+ * COPYRIGHT (c) 2011.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in 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/score/isr.h>
+#include <rtems/score/scheduler.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/schedulersimple.h>
+
+void _Scheduler_simple_Yield( void )
+{
+ ISR_Level level;
+ Thread_Control *executing;
+
+ executing = _Thread_Executing;
+ _ISR_Disable( level );
+<span style="background-color: #FF0000"> </span>
+ _Scheduler_simple_Ready_queue_Requeue(&_Scheduler, executing);
+
+ _ISR_Flash( level );
+
+ _Scheduler_simple_Schedule();
+<span style="background-color: #FF0000"> </span>
+ if ( !_Thread_Is_heir( executing ) )
+ _Thread_Dispatch_necessary = true;
+
+ _ISR_Enable( level );
+}
</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-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>
PR 1743/cpu
* Makefile.am, configure.ac, spsize/size.c: Add Simple Priority
Scheduler as complement to existing Deterministic Priority Scheduler.
This scheduler serves both as an example and as a lighter weight
implementation for smaller systems.
* spsimplesched01/.cvsignore, spsimplesched01/Makefile.am,
spsimplesched01/init.c, spsimplesched01/spsimplesched01.doc,
spsimplesched01/spsimplesched01.scn, spsimplesched02/.cvsignore,
spsimplesched02/Makefile.am, spsimplesched02/init.c,
spsimplesched02/spsimplesched02.doc,
spsimplesched02/spsimplesched02.scn, spsimplesched03/.cvsignore,
spsimplesched03/Makefile.am, spsimplesched03/init.c,
spsimplesched03/spsimplesched03.doc,
spsimplesched03/spsimplesched03.scn: New files.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/ChangeLog.diff?r1=text&tr1=1.442&r2=text&tr2=1.443&diff_format=h">M</a></td><td width='1%'>1.443</td><td width='100%'>testsuites/sptests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/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%'>testsuites/sptests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/configure.ac.diff?r1=text&tr1=1.114&r2=text&tr2=1.115&diff_format=h">M</a></td><td width='1%'>1.115</td><td width='100%'>testsuites/sptests/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched01/.cvsignore?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">testsuites/sptests/spsimplesched01/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched01/Makefile.am?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">testsuites/sptests/spsimplesched01/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched01/init.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">testsuites/sptests/spsimplesched01/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched01/spsimplesched01.doc?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">testsuites/sptests/spsimplesched01/spsimplesched01.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched01/spsimplesched01.scn?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">testsuites/sptests/spsimplesched01/spsimplesched01.scn</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched02/.cvsignore?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">testsuites/sptests/spsimplesched02/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched02/Makefile.am?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">testsuites/sptests/spsimplesched02/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched02/init.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">testsuites/sptests/spsimplesched02/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched02/spsimplesched02.doc?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">testsuites/sptests/spsimplesched02/spsimplesched02.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched02/spsimplesched02.scn?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">testsuites/sptests/spsimplesched02/spsimplesched02.scn</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched03/.cvsignore?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">testsuites/sptests/spsimplesched03/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched03/Makefile.am?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">testsuites/sptests/spsimplesched03/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched03/init.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">testsuites/sptests/spsimplesched03/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched03/spsimplesched03.doc?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">testsuites/sptests/spsimplesched03/spsimplesched03.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsimplesched03/spsimplesched03.scn?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">testsuites/sptests/spsimplesched03/spsimplesched03.scn</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/spsize/size.c.diff?r1=text&tr1=1.70&r2=text&tr2=1.71&diff_format=h">M</a></td><td width='1%'>1.71</td><td width='100%'>testsuites/sptests/spsize/size.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/sptests/ChangeLog:1.442 rtems/testsuites/sptests/ChangeLog:1.443
--- rtems/testsuites/sptests/ChangeLog:1.442 Fri Mar 11 14:36:45 2011
+++ rtems/testsuites/sptests/ChangeLog Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -1,3 +1,20 @@
</font><font color='#000088'>+2011-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>
+
+ PR 1743/cpu
+ * Makefile.am, configure.ac, spsize/size.c: Add Simple Priority
+ Scheduler as complement to existing Deterministic Priority Scheduler.
+ This scheduler serves both as an example and as a lighter weight
+ implementation for smaller systems.
+ * spsimplesched01/.cvsignore, spsimplesched01/Makefile.am,
+ spsimplesched01/init.c, spsimplesched01/spsimplesched01.doc,
+ spsimplesched01/spsimplesched01.scn, spsimplesched02/.cvsignore,
+ spsimplesched02/Makefile.am, spsimplesched02/init.c,
+ spsimplesched02/spsimplesched02.doc,
+ spsimplesched02/spsimplesched02.scn, spsimplesched03/.cvsignore,
+ spsimplesched03/Makefile.am, spsimplesched03/init.c,
+ spsimplesched03/spsimplesched03.doc,
+ spsimplesched03/spsimplesched03.scn: New files.
+
</font> 2011-03-11 Joel Sherrill <joel.sherrilL@OARcorp.com>
* sp58/init.c, sp58/sp58.scn: Account for case where left hand side
<font color='#006600'>diff -u rtems/testsuites/sptests/Makefile.am:1.107 rtems/testsuites/sptests/Makefile.am:1.108
--- rtems/testsuites/sptests/Makefile.am:1.107 Fri Mar 11 10:39:27 2011
+++ rtems/testsuites/sptests/Makefile.am Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -28,7 +28,8 @@
</font> spintrcritical05 spintrcritical06 spintrcritical07 spintrcritical08 \
spintrcritical09 spintrcritical10 spintrcritical11 spintrcritical12 \
spintrcritical13 spintrcritical14 spintrcritical15 spintrcritical16 \
<font color='#880000'>- spintrcritical17 spmkdir spmountmgr01 spheapprot
</font><font color='#000088'>+ spintrcritical17 spmkdir spmountmgr01 spheapprot \
+ spsimplesched01 spsimplesched02 spsimplesched03
</font>
DIST_SUBDIRS = $(SUBDIRS) spfatal_support spintrcritical_support
EXTRA_DIST = spfatal_support/init.c spfatal_support/system.h
<font color='#006600'>diff -u rtems/testsuites/sptests/configure.ac:1.114 rtems/testsuites/sptests/configure.ac:1.115
--- rtems/testsuites/sptests/configure.ac:1.114 Fri Mar 11 10:39:27 2011
+++ rtems/testsuites/sptests/configure.ac Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -160,6 +160,9 @@
</font> spobjgetnext/Makefile
spprintk/Makefile
spprivenv01/Makefile
<font color='#000088'>+spsimplesched01/Makefile
+spsimplesched02/Makefile
+spsimplesched03/Makefile
</font> spsize/Makefile
spstkalloc/Makefile
spthreadq01/Makefile
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched01/.cvsignore:1.1
--- /dev/null Wed Mar 16 12:10:15 2011
+++ rtems/testsuites/sptests/spsimplesched01/.cvsignore Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,2 @@
</font><font color='#000088'>+Makefile
+Makefile.in
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched01/Makefile.am:1.1
--- /dev/null Wed Mar 16 12:10:15 2011
+++ rtems/testsuites/sptests/spsimplesched01/Makefile.am Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,28 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spsimplesched01<span style="background-color: #FF0000"> </span>
+spsimplesched01_SOURCES = init.c
+
+dist_rtems_tests_DATA = spsimplesched01.scn
+dist_rtems_tests_DATA += spsimplesched01.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+spsimplesched01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(spsimplesched01_OBJECTS) $(spsimplesched01_LDADD)
+LINK_LIBS = $(spsimplesched01_LDLIBS)
+
+spsimplesched01$(EXEEXT): $(spsimplesched01_OBJECTS) $(spsimplesched01_DEPENDENCIES)
+ @rm -f spsimplesched01$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched01/init.c:1.1
--- /dev/null Wed Mar 16 12:10:15 2011
+++ rtems/testsuites/sptests/spsimplesched01/init.c Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,115 @@
</font><font color='#000088'>+/*<span style="background-color: #FF0000"> </span>
+ * 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$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tmacros.h>
+
+/*
+ * Keep the names and IDs in global variables so another task can use them.
+ */
+rtems_id Task_id[ 4 ]; /* array of task ids */
+rtems_name Task_name[ 4 ]; /* array of task names */
+
+rtems_task Test_task(
+ rtems_task_argument unused
+)
+{
+ rtems_id tid;
+ rtems_time_of_day time;
+ uint32_t task_index;
+ rtems_status_code status;
+
+ status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ task_index = task_number( tid );
+ for ( ; ; ) {
+ status = rtems_clock_get_tod( &time );
+ if ( time.second >= 35 ) {
+ puts( "*** END OF SIMPLE01 TEST ***" );
+ rtems_test_exit( 0 );
+ }
+ put_name( Task_name[ task_index ], FALSE );
+ print_time( " - rtems_clock_get_tod - ", &time, "\n" );
+ status = rtems_task_wake_after(
+ task_index * 5 * rtems_clock_get_ticks_per_second() );
+ }
+}
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ rtems_status_code status;
+ rtems_time_of_day time;
+ rtems_task_priority old;
+
+ puts( "\n\n*** SIMPLE01 TEST ***" );
+
+ time.year = 1988;
+ time.month = 12;
+ time.day = 31;
+ time.hour = 9;
+ time.minute = 0;
+ time.second = 0;
+ time.ticks = 0;
+
+ status = rtems_clock_set( &time );
+
+ Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
+ Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
+ Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
+
+ status = rtems_task_create(
+ Task_name[ 1 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
+ );
+ status = rtems_task_create(
+ Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
+ );
+ status = rtems_task_create(
+ Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ]
+ );
+
+ status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
+ rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+ status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
+ rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+ status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
+
+ rtems_task_set_priority(Task_id[1], 2, &old);
+ rtems_task_set_priority(Task_id[2], 2, &old);
+ rtems_task_set_priority(Task_id[3], 2, &old);
+
+ rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+
+ status = rtems_task_delete( RTEMS_SELF );
+}
+
+/* configuration information */
+#include <bsp.h> /* for device driver prototypes */
+
+#define CONFIGURE_SCHEDULER_SIMPLE
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 4
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched01/spsimplesched01.doc:1.1
--- /dev/null Wed Mar 16 12:10:15 2011
+++ rtems/testsuites/sptests/spsimplesched01/spsimplesched01.doc Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,23 @@
</font><font color='#000088'>+#
+# $Id$
+#
+# 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.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: spsimplesched01
+
+directives:
+ + rtems_task_wake_after - yield case
+ + rtems_task_set_priority - preempt and no preempt case
+
+concepts:
+
++ The purpose of this test is to exercise paths in the Simple Scheduler.
+ It exercises Initialization, Allocate, Free, Block, Unblock, and Yield.
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched01/spsimplesched01.scn:1.1
--- /dev/null Wed Mar 16 12:10:15 2011
+++ rtems/testsuites/sptests/spsimplesched01/spsimplesched01.scn Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,16 @@
</font><font color='#000088'>+*** SIMPLE01 TEST ***
+TA1 - clock_get_tod - 09:00:00 12/31/1988
+TA2 - clock_get_tod - 09:00:00 12/31/1988
+TA3 - clock_get_tod - 09:00:00 12/31/1988
+TA1 - clock_get_tod - 09:00:05 12/31/1988
+TA1 - clock_get_tod - 09:00:10 12/31/1988
+TA2 - clock_get_tod - 09:00:10 12/31/1988
+TA1 - clock_get_tod - 09:00:15 12/31/1988
+TA3 - clock_get_tod - 09:00:15 12/31/1988
+TA1 - clock_get_tod - 09:00:20 12/31/1988
+TA2 - clock_get_tod - 09:00:20 12/31/1988
+TA1 - clock_get_tod - 09:00:25 12/31/1988
+TA1 - clock_get_tod - 09:00:30 12/31/1988
+TA2 - clock_get_tod - 09:00:30 12/31/1988
+TA3 - clock_get_tod - 09:00:30 12/31/1988
+*** END OF SIMPLE01 TEST ***
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched02/.cvsignore:1.1
--- /dev/null Wed Mar 16 12:10:15 2011
+++ rtems/testsuites/sptests/spsimplesched02/.cvsignore Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,2 @@
</font><font color='#000088'>+Makefile
+Makefile.in
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched02/Makefile.am:1.1
--- /dev/null Wed Mar 16 12:10:15 2011
+++ rtems/testsuites/sptests/spsimplesched02/Makefile.am Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,28 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spsimplesched02<span style="background-color: #FF0000"> </span>
+spsimplesched02_SOURCES = init.c
+
+dist_rtems_tests_DATA = spsimplesched02.scn
+dist_rtems_tests_DATA += spsimplesched02.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+spsimplesched02_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(spsimplesched02_OBJECTS) $(spsimplesched02_LDADD)
+LINK_LIBS = $(spsimplesched02_LDLIBS)
+
+spsimplesched02$(EXEEXT): $(spsimplesched02_OBJECTS) $(spsimplesched02_DEPENDENCIES)
+ @rm -f spsimplesched02$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched02/init.c:1.1
--- /dev/null Wed Mar 16 12:10:15 2011
+++ rtems/testsuites/sptests/spsimplesched02/init.c Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,143 @@
</font><font color='#000088'>+/*<span style="background-color: #FF0000"> </span>
+ * 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$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tmacros.h>
+
+/*
+ * Keep the names and IDs in global variables so another task can use them.
+ */
+rtems_id Task_id[ 3 ]; /* array of task ids */
+rtems_name Task_name[ 3 ]; /* array of task names */
+rtems_name Semaphore_name[ 2 ];
+rtems_id Semaphore_id[ 2 ];
+
+rtems_task Test_task(
+ rtems_task_argument unused
+)
+{
+ rtems_id tid;
+ uint32_t task_index;
+ rtems_status_code status;
+
+ status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
+ task_index = task_number( tid );
+
+ for ( ; ; ) {
+ rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
+ }
+}
+
+void ObtainRelease( bool suspendIdle )<span style="background-color: #FF0000"> </span>
+{
+ rtems_status_code status;
+
+ if (suspendIdle) {
+ puts( "INIT - Suspend Idle Task");
+ status = rtems_task_suspend( _Thread_Idle->Object.id );
+ directive_failed( status, "rtems_task_suspend idle" );
+ }
+
+ puts( "INIT - Obtain priority ceiling semaphore - priority increases" );
+ status= rtems_semaphore_obtain( Semaphore_id[1], RTEMS_DEFAULT_OPTIONS, 0 );
+ directive_failed( status, "rtems_semaphore_obtain" );
+
+ puts( "INIT - Obtain priority ceiling semaphore - priority decreases" );
+ status = rtems_semaphore_release( Semaphore_id[1] );
+ directive_failed( status, "rtems_semaphore_release" );
+
+ if (suspendIdle) {
+ puts( "INIT - Resume Idle Task");
+ status = rtems_task_resume( _Thread_Idle->Object.id );
+ directive_failed( status, "rtems_task_resume idle" );
+ }
+}
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ rtems_status_code status;
+
+ puts( "\n\n*** SIMPLE SCHEDULER 02 TEST ***" );
+
+ /*
+ * Create the semaphore. Then obtain and release the
+ * semaphore with no other tasks running.
+ */
+ puts( "INIT - Create priority ceiling semaphore" );
+ Semaphore_name[ 1 ] = rtems_build_name( 'S', 'M', '1', ' ' );
+ status = rtems_semaphore_create(
+ Semaphore_name[ 1 ],
+ 1,
+ RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY_CEILING | RTEMS_PRIORITY,
+ 2,
+ &Semaphore_id[ 1 ]
+ );
+ directive_failed( status, "rtems_semaphore_create of SM1" );
+ ObtainRelease( false );
+
+ /*
+ * Create test task and obtain release the semaphore with
+ * one other task running.
+ */
+ puts( "INIT - create task 1" );
+ Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
+ status = rtems_task_create(
+ Task_name[ 1 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
+ );
+ status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
+ ObtainRelease( false );
+
+ /*
+ * Create a a second test task and obtain release the semaphore
+ * with both tasks running.
+ */
+ puts( "INIT - create task 2" );
+ Task_name[ 1 ] = rtems_build_name( 'T', 'A', '2', ' ' );
+ status = rtems_task_create(
+ Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
+ );
+ status = rtems_task_start( Task_id[ 2 ], Test_task, 1 );
+ ObtainRelease( false );
+
+ /*
+ * Obtain and release the semaphore with the idle task suspended.
+ */
+ ObtainRelease( true );
+
+ /* End the Test */
+ puts( "*** END OF SIMPLE SCHEDULER 02 TEST ***" );
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_SCHEDULER_SIMPLE
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 3<span style="background-color: #FF0000"> </span>
+#define CONFIGURE_MAXIMUM_SEMAPHORES 2
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
+#define CONFIGURE_INIT_TASK_PRIORITY 4
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of include file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched02/spsimplesched02.doc:1.1
--- /dev/null Wed Mar 16 12:10:16 2011
+++ rtems/testsuites/sptests/spsimplesched02/spsimplesched02.doc Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,24 @@
</font><font color='#000088'>+#
+# $Id$
+#
+# 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.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: spsimplesched02
+
+directives:
+ + rtems_semaphore_create
+ + rtems_semaphore_obtain
+ + rtems_semaphore_release
+
+concepts:
+
++ The purpose of this test is to exercise paths in the Simple Scheduler.
+ It exercises logic required to inherit and restore priority.
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched02/spsimplesched02.scn:1.1
--- /dev/null Wed Mar 16 12:10:16 2011
+++ rtems/testsuites/sptests/spsimplesched02/spsimplesched02.scn Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,15 @@
</font><font color='#000088'>+*** SIMPLE SCHEDULER 02 TEST ***
+INIT - Create priority ceiling semaphore
+INIT - Obtain priority ceiling semaphore - priority increases
+INIT - Obtain priority ceiling semaphore - priority decreases
+INIT - create task 1
+INIT - Obtain priority ceiling semaphore - priority increases
+INIT - Obtain priority ceiling semaphore - priority decreases
+INIT - create task 2
+INIT - Obtain priority ceiling semaphore - priority increases
+INIT - Obtain priority ceiling semaphore - priority decreases
+INIT - Suspend Idle Task
+INIT - Obtain priority ceiling semaphore - priority increases
+INIT - Obtain priority ceiling semaphore - priority decreases
+INIT - Resume Idle Task
+*** END OF SIMPLE SCHEDULER 02 TEST ***
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched03/.cvsignore:1.1
--- /dev/null Wed Mar 16 12:10:16 2011
+++ rtems/testsuites/sptests/spsimplesched03/.cvsignore Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,2 @@
</font><font color='#000088'>+Makefile
+Makefile.in
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched03/Makefile.am:1.1
--- /dev/null Wed Mar 16 12:10:16 2011
+++ rtems/testsuites/sptests/spsimplesched03/Makefile.am Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,28 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spsimplesched03<span style="background-color: #FF0000"> </span>
+spsimplesched03_SOURCES = init.c
+
+dist_rtems_tests_DATA = spsimplesched03.scn
+dist_rtems_tests_DATA += spsimplesched03.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+spsimplesched03_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(spsimplesched03_OBJECTS) $(spsimplesched03_LDADD)
+LINK_LIBS = $(spsimplesched03_LDLIBS)
+
+spsimplesched03$(EXEEXT): $(spsimplesched03_OBJECTS) $(spsimplesched03_DEPENDENCIES)
+ @rm -f spsimplesched03$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched03/init.c:1.1
--- /dev/null Wed Mar 16 12:10:16 2011
+++ rtems/testsuites/sptests/spsimplesched03/init.c Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,50 @@
</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$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tmacros.h>
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ rtems_status_code status;
+
+ puts( "\n\n*** SIMPLE SCHEDULER 03 TEST ***" );
+
+ puts( "INIT - rtems timer initiate server");
+ status = rtems_timer_initiate_server(<span style="background-color: #FF0000"> </span>
+ RTEMS_TIMER_SERVER_DEFAULT_PRIORITY,
+ RTEMS_MINIMUM_STACK_SIZE,
+ RTEMS_DEFAULT_ATTRIBUTES
+ );
+ directive_failed( status, "Timer Initiate Server" );
+
+ /* End the Test */
+ puts( "*** END OF SIMPLE SCHEDULER 03 TEST ***" );
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+#define CONFIGURE_SCHEDULER_SIMPLE
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 2
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_INIT_TASK_PRIORITY 2
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of include file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched03/spsimplesched03.doc:1.1
--- /dev/null Wed Mar 16 12:10:16 2011
+++ rtems/testsuites/sptests/spsimplesched03/spsimplesched03.doc Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,22 @@
</font><font color='#000088'>+#
+# $Id$
+#
+# 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.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: spsimplesched03
+
+directives:
+ + rtems_timer_initiate_server
+
+concepts:
+
++ The purpose of this test is to exercise paths in the Simple Scheduler.
+ It exercises the preemption of the zero priority Timer Server.
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/sptests/spsimplesched03/spsimplesched03.scn:1.1
--- /dev/null Wed Mar 16 12:10:16 2011
+++ rtems/testsuites/sptests/spsimplesched03/spsimplesched03.scn Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -0,0 +1,3 @@
</font><font color='#000088'>+*** SIMPLE SCHEDULER 03 TEST ***
+INIT - rtems timer initiate server
+*** END OF SIMPLE SCHEDULER 03 TEST ***
</font>
<font color='#006600'>diff -u rtems/testsuites/sptests/spsize/size.c:1.70 rtems/testsuites/sptests/spsize/size.c:1.71
--- rtems/testsuites/sptests/spsize/size.c:1.70 Tue Feb 22 01:37:03 2011
+++ rtems/testsuites/sptests/spsize/size.c Wed Mar 16 11:33:04 2011
</font><font color='#997700'>@@ -72,26 +72,30 @@
</font> #define HEAP_OVHD 16 /* wasted heap space per task stack */
#define NAME_PTR_SIZE 8 /* size of name and pointer table entries */
<font color='#880000'>-#if CONFIGURE_SCHEDULER_POLICY == _Scheduler_PRIORITY
- #include <rtems/score/prioritybitmap.h>
</font><font color='#000088'>+/*
+ * This assumes the default Priority Scheduler
+ */
+#include <rtems/score/prioritybitmap.h>
+#include <rtems/score/schedulerpriority.h>
+
+/* Priority scheduling uninitialized (globals) consumption */
+#define SCHEDULER_OVHD ((sizeof _Scheduler) + \
+ (sizeof _Priority_Major_bit_map) + \
+ (sizeof _Priority_Bit_map))
+
+/* Priority scheduling per-thread consumption. Gets<span style="background-color: #FF0000"> </span>
+ * included in the PER_TASK consumption.
+ */
+#define SCHEDULER_TASK_WKSP (sizeof(Scheduler_priority_Per_thread))
</font>
<font color='#880000'>- /* Priority scheduling uninitialized (globals) consumption */
- #define SCHEDULER_OVHD ((sizeof _Scheduler) + \
- (sizeof _Priority_Major_bit_map) + \
- (sizeof _Priority_Bit_map))
-
- /* Priority scheduling per-thread consumption. Gets<span style="background-color: #FF0000"> </span>
- * included in the PER_TASK consumption. */
- #define SCHEDULER_TASK_WKSP (sizeof(Scheduler_priority_Per_thread))
-
- /* Priority scheduling workspace consumption<span style="background-color: #FF0000"> </span>
- *
- * Include allocation of ready queue. Pointers are already counted by<span style="background-color: #FF0000"> </span>
- * including _Scheduler in SCHEDULER_OVHD.
- */
- #define SCHEDULER_WKSP_SIZE \
</font><font color='#000088'>+/* Priority scheduling workspace consumption<span style="background-color: #FF0000"> </span>
+ *
+ * Include allocation of ready queue. Pointers are already counted by<span style="background-color: #FF0000"> </span>
+ * including _Scheduler in SCHEDULER_OVHD.
+ */
+#define SCHEDULER_WKSP_SIZE \
</font> ((RTEMS_MAXIMUM_PRIORITY + 1) * sizeof(Chain_Control ))
<font color='#880000'>-#endif
</font><font color='#000088'>+/****** END OF MEMORY USAGE OF DEFAULT PRIORITY SCHEDULER ******/
</font>
#define PER_TASK \
(long) (sizeof (Thread_Control) + \
</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>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>
PR 1743/cpu
* user/conf.t: Add Simple Priority Scheduler as complement to existing
Deterministic Priority Scheduler. This scheduler serves both as an
example and as a lighter weight implementation for smaller systems.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/doc/ChangeLog.diff?r1=text&tr1=1.302&r2=text&tr2=1.303&diff_format=h">M</a></td><td width='1%'>1.303</td><td width='100%'>doc/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/doc/user/conf.t.diff?r1=text&tr1=1.67&r2=text&tr2=1.68&diff_format=h">M</a></td><td width='1%'>1.68</td><td width='100%'>doc/user/conf.t</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/doc/ChangeLog:1.302 rtems/doc/ChangeLog:1.303
--- rtems/doc/ChangeLog:1.302 Fri Mar 4 12:47:52 2011
+++ rtems/doc/ChangeLog Wed Mar 16 11:39:16 2011
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+2011-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>
+
+ PR 1743/cpu
+ * user/conf.t: Add Simple Priority Scheduler as complement to existing
+ Deterministic Priority Scheduler. This scheduler serves both as an
+ example and as a lighter weight implementation for smaller systems.
+
</font> 2011-03-04 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1752/doc
<font color='#006600'>diff -u rtems/doc/user/conf.t:1.67 rtems/doc/user/conf.t:1.68
--- rtems/doc/user/conf.t:1.67 Thu Feb 17 16:37:06 2011
+++ rtems/doc/user/conf.t Wed Mar 16 11:39:16 2011
</font><font color='#997700'>@@ -408,6 +408,16 @@
</font> of priorities configured in the system. This scheduler may be explicitly
selected by defining @code{CONFIGURE_SCHEDULER_PRIORITY}.
<font color='#000088'>+@findex CONFIGURE_SCHEDULER_SIMPLE
+@item Simple Priority Scheduler - This is an alternative scheduler
+in RTEMS. It is designed to provide the same task scheduling behaviour
+as the Deterministic Priority Scheduler while being simpler in implementation
+and uses less memory for data management. It maintains a single sorted list
+of all ready threads. Thus blocking or unblocking a thread is not a
+constant time operation with this scheduler. This scheduler is appropriate
+for use in small systems where RAM is limited. This scheduler may be explicitly
+selected by defining @code{CONFIGURE_SCHEDULER_SIMPLE}.
+
</font> @end itemize
The pluggable scheduler interface was added after the 4.10 release series
</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>