-SUBDIRS = system_opt libbar appfoo
+SUBDIRS = system_opt libbar appfoo edf
#lib_LIBRARIES =
-#include_HEADERS =
+include_HEADERS = ../edf/scheduler_edf.h ../edf/edf_types.h ../edf/rbtree.h
-appfoo_SOURCES += init.c task_1.c task_2.c scheduler_edf.c scheduler_priority.c rbtree.c
+appfoo_SOURCES += init.c task_1.c task_2.c
#appfoo_EMBEDTARFILES = rootfs
lib_LOADLIBES += bar
+appfoo_LIBS = edf
+
+++ /dev/null
-// =====================================================================================
-// =====================================================================================
-// =====================================================================================
-
-/*
- * Scheduler Priority Handler / Allocate
- *
- * Copyright (C) 2010 Gedare Bloom.
- * 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: schedulerpriorityallocate.c,v 1.1 2011/02/18 15:12:43 joel Exp $
- */
-
-#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>
-#include <rtems/score/wkspace.h>
-
-void* _Scheduler_priority_Allocate (
- Thread_Control *the_thread
-)
-{
- void *sched;
-
- sched = _Workspace_Allocate( sizeof(Scheduler_priority_Per_thread) );
-
- the_thread->scheduler_info = (Scheduler_priority_Per_thread*) sched;
-
- return sched;
-}
-/*
- * Scheduler Handler
- *
- * Copyright (C) 2010 Gedare Bloom.
- * 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: schedulerpriorityblock.c,v 1.4 2011/02/18 15:12:43 joel Exp $
- */
-
-#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/schedulerpriority.h>
-#include <rtems/score/thread.h>
-
-void _Scheduler_priority_Block(
- Thread_Control *the_thread
-)
-{
- _Scheduler_priority_Ready_queue_extract( the_thread );
-
- /* TODO: flash critical section? */
-
- if ( _Thread_Is_heir( the_thread ) )
- _Scheduler_priority_Schedule_body();
-
- if ( _Thread_Is_executing( the_thread ) )
- _Thread_Dispatch_necessary = true;
-
-}
-/*
- * Scheduler Handler
- *
- * Copyright (C) 2010 Gedare Bloom.
- * 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: schedulerpriority.c,v 1.5 2011/02/28 00:10:38 joel Exp $
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/prioritybitmap.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/schedulerpriority.h>
-
-/* Instantiate any global variables needed by the priority scheduler */
-volatile Priority_bit_map_Control _Priority_Major_bit_map;
-
-Priority_bit_map_Control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
-
-void _Scheduler_priority_Initialize(void)
-{
- _Scheduler_priority_Ready_queue_initialize();
- _Priority_bit_map_Handler_initialization();
-}
-/*
- * 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: schedulerpriorityenqueue.c,v 1.1 2011/02/18 15:12:44 joel Exp $
- */
-
-#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_Enqueue(
- Thread_Control *the_thread
-)
-{
- _Scheduler_priority_Ready_queue_enqueue( the_thread );
-}
-/*
- * 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: schedulerpriorityenqueuefirst.c,v 1.1 2011/02/18 15:12:44 joel Exp $
- */
-
-#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>
-
-void _Scheduler_priority_Enqueue_first(
- Thread_Control *the_thread
-)
-{
- _Scheduler_priority_Ready_queue_enqueue_first( the_thread );
-}
-
-/* Scheduler Simple Handler / Extract
- *
- * 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: schedulerpriorityextract.c,v 1.2 2011/02/28 00:10:38 joel Exp $
- */
-
-#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>
-
-void _Scheduler_priority_Extract(
- Thread_Control *the_thread
-)
-{
- _Scheduler_priority_Ready_queue_extract( the_thread );
-}
-/*
- * Scheduler Handler
- *
- * Copyright (C) 2010 Gedare Bloom.
- * 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: schedulerpriorityfree.c,v 1.1 2011/02/18 15:12:44 joel Exp $
- */
-
-#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>
-#include <rtems/score/wkspace.h>
-
-void _Scheduler_priority_Free (
- Thread_Control *the_thread
-)
-{
- _Workspace_Free( the_thread->scheduler_info );
-}
-/*
- * Scheduler Handler / Scheduler
- *
- * Copyright (C) 2010 Gedare Bloom.
- * 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: schedulerpriorityschedule.c,v 1.4 2011/02/18 15:12:44 joel Exp $
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/system.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/schedulerpriority.h>
-
-void _Scheduler_priority_Schedule(void)
-{
- _Scheduler_priority_Schedule_body();
-}
-/*
- * Scheduler Handler
- *
- * Copyright (C) 2010 Gedare Bloom.
- * 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: schedulerpriorityunblock.c,v 1.4 2011/02/18 15:12:44 joel Exp $
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/system.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/schedulerpriority.h>
-
-void _Scheduler_priority_Unblock (
- Thread_Control *the_thread
-)
-{
- _Scheduler_priority_Ready_queue_enqueue(the_thread);
-
- /* TODO: flash critical section? */
-
- /*
- * 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;
- }
-}
-/*
- * Scheduler Handler
- *
- * Copyright (C) 2010 Gedare Bloom.
- * 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: schedulerpriorityupdate.c,v 1.2 2011/02/28 00:10:38 joel Exp $
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/prioritybitmap.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/schedulerpriority.h>
-#include <rtems/score/thread.h>
-
-void _Scheduler_priority_Update(
- Thread_Control *the_thread
-)
-{
- Scheduler_priority_Per_thread *sched_info;
- Chain_Control *rq;
-
- sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
- rq = (Chain_Control *) _Scheduler.information;
-
- sched_info->ready_chain = &rq[ the_thread->current_priority ];
-
- _Priority_bit_map_Initialize_information(
- &sched_info->Priority_map,
- the_thread->current_priority
- );
-}
-/*
- * Scheduler Priority Handler / Yield
- *
- * Copyright (C) 2010 Gedare Bloom.
- * 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: schedulerpriorityyield.c,v 1.6 2011/02/18 15:12:44 joel Exp $
- */
-
-#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/schedulerpriority.h>
-#include <rtems/score/thread.h>
-
-/*
- * INTERRUPT LATENCY:
- * ready chain
- * select heir
- */
-
-void _Scheduler_priority_Yield(void)
-{
- Scheduler_priority_Per_thread *sched_info;
- ISR_Level level;
- Thread_Control *executing;
- Chain_Control *ready;
-
- executing = _Thread_Executing;
- sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info;
- ready = sched_info->ready_chain;
- _ISR_Disable( level );
- if ( !_Chain_Has_only_one_node( ready ) ) {
- _Chain_Extract_unprotected( &executing->Object.Node );
- _Chain_Append_unprotected( ready, &executing->Object.Node );
-
- _ISR_Flash( level );
-
- if ( _Thread_Is_heir( executing ) )
- _Thread_Heir = (Thread_Control *) _Chain_First( ready );
- _Thread_Dispatch_necessary = true;
- }
- else if ( !_Thread_Is_heir( executing ) )
- _Thread_Dispatch_necessary = true;
-
- _ISR_Enable( level );
-}
* - CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER - per task memory
*/
-// to enable our own scheduler
+/// Enable yur own scheduler
#define CONFIGURE_SCHEDULER_USER
/**
- * Entry points for a edf Scheduler.
+ * EDF scheduler configuration.
*/
-#define CONFIGURE_SCHEDULER_USER_ENTRY_POINTS
-// EDF
-#include "scheduler_edf.h"
-#include "rbtree.h"
-#define SCHEDULER_ENTRY_POINTS SCHEDULER_EDF_ENTRY_POINTS
- // Priority
- //#include "scheduler_priority.h"
- //#define SCHEDULER_ENTRY_POINTS SCHEDULER_PRIORITY_ENTRY_POINTS
-
-#define CONFIGURE_MEMORY_FOR_SCHEDULER (_Configure_From_workspace(sizeof(EDF_Chain_Control)))
-#define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER (_Configure_From_workspace(sizeof(RBT_Node)))
-
+#ifdef CONFIGURE_SCHEDULER_USER
+ #define CONFIGURE_SCHEDULER_USER_ENTRY_POINTS
+ #include "scheduler_edf.h"
+ #define SCHEDULER_ENTRY_POINTS SCHEDULER_EDF_ENTRY_POINTS
+ #define CONFIGURE_MEMORY_FOR_SCHEDULER (_Configure_From_workspace(sizeof(EDF_Chain_Control)))
+ #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER (_Configure_From_workspace(sizeof(RBT_Node)))
+#endif
rtems_task_argument argument
)
{
+ int i, s;
rtems_status_code status;
printf("*** Starting up Task_1 ***\n");
while(1){
printf("Task_1 woken\n");
+ for (i = 0; i < 10000; i++)
+ s = i+i;
status = rtems_task_wake_after( TICKS_PER_SECOND );
check_rtems_status( status, 0, "rtems_task_wake_after" );
}
rtems_task_argument argument
)
{
- int i;
- int s;
+ int i, s;
rtems_status_code status;
printf("*** Starting up Task_2 ***\n");
--- /dev/null
+#RTEMS_MAKEFILE_PATH=/home/petr/git/rtems/b-rtems-icecube/powerpc-rtems4.10/icecube
+RTEMS_MAKEFILE_PATH=/home/petr/git/rtems/b-rtems-i386/i386-rtems4.11/pc386
+
\ No newline at end of file
--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or parent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+#default_CONFIG += CONFIG_OC_BUILD4RTEMS=y
+#default_CONFIG += CONFIG_OC_GDBSTUB=n
+
+lib_LIBRARIES = edf
+
+#include_HEADERS =
+
+edf_SOURCES += scheduler_edf.c rbtree.c
+
+#appfoo_EMBEDTARFILES = rootfs
+
+#lib_LOADLIBES += bar
+
--- /dev/null
+#ifndef __EDF_TYPES_h
+#define __EDF_TYPES_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rtems/system.h>
+#include <rtems/score/types.h>
+#include <rtems/score/thread.h>
+
+
+typedef uint32_t Deadline_Control;
+
+#define ABS_DEADLINE_MAXIMUM 0xffffffff
+
+typedef enum node_color_struct { N_RED, N_BLACK } Node_Color;
+typedef Thread_Control EDF_Node;
+
+typedef struct {
+ EDF_Node *root; // root of tree
+ EDF_Node *first; // first task in queue
+} EDF_Chain_Control;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*__EDF_TYPES_h*/
--- /dev/null
+#include "scheduler_edf.h"
+#include "rbtree.h"
+#include <stdio.h>
+#include <rtems/system.h>
+#include <rtems/score/isr.h>
+#include <rtems/score/watchdog.h>
+#include <rtems/score/wkspace.h>
+#include <rtems/score/percpu.h>
+
+
+
+void _Scheduler_edf_Initialize(void) {
+ // initialize the RB tree
+ _Thread_Ready_EDF_chain.root = NULL;
+ _Thread_Ready_EDF_chain.first = NULL;
+ _Thread_Heir = NULL;
+ _Thread_Executing = NULL;
+}
+
+void _Scheduler_edf_Block( Thread_Control *the_thread ) {
+ _Scheduler_edf_Extract(the_thread);
+
+ /* TODO: flash critical section? */
+
+ if ( _Thread_Is_heir( the_thread ) )
+ _Scheduler_edf_Schedule();
+
+ if ( _Thread_Is_executing( the_thread ) )
+ _Thread_Dispatch_necessary = true;
+}
+
+void _Scheduler_edf_Schedule(void) {
+ // set the heir
+ _Thread_Heir = (Thread_Control *) _Thread_Ready_EDF_chain.first;
+}
+
+void * _Scheduler_edf_Allocate( Thread_Control *the_thread) {
+ void * sched;
+ RBT_Node *schinfo;
+ sched = _Workspace_Allocate (sizeof(RBT_Node));
+ the_thread->scheduler_info = (RBT_Node *) sched;
+
+ schinfo = (RBT_Node *)(the_thread->scheduler_info);
+ schinfo->rel_deadline = the_thread->real_priority;
+ schinfo->abs_deadline = 0;
+ schinfo->left = NULL;
+ schinfo->right = NULL;
+ schinfo->parent = NULL;
+ schinfo->ready_chain = &_Thread_Ready_EDF_chain;
+
+ return sched;
+}
+
+void _Scheduler_edf_Free( Thread_Control *the_thread) {
+ _Workspace_Free (the_thread->scheduler_info);
+}
+
+void _Scheduler_edf_Update( Thread_Control *the_thread) {
+ // after a priority changes, just extract and insert again
+ //in case it is in the tree
+// EDF_Chain_Control* chain = ((RBT_Node*)the_thread->scheduler_info)->ready_chain;
+// _RBT_Extract(chain, the_thread);
+// _RBT_Insert(chain, the_thread); // preserve the abs_deadline
+}
+
+void _Scheduler_edf_Unblock( Thread_Control *the_thread ) {
+ _Scheduler_edf_Enqueue(the_thread);
+ /* TODO: flash critical section? */
+
+ /*
+ * 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;
+ }
+}
+
+void _Scheduler_edf_Yield( void ) {
+ RBT_Node *sched_info;
+ ISR_Level level;
+ Thread_Control *executing;
+ EDF_Chain_Control *ready;
+
+ executing = _Thread_Executing;
+ sched_info = (RBT_Node *) executing->scheduler_info;
+ ready = sched_info->ready_chain;
+ _ISR_Disable( level );
+ if ( !_RBT_Has_only_one_node( ready ) ) {
+ _RBT_Extract(ready,executing);
+ _RBT_Insert(ready,executing); // preserve the abs_deadline
+
+ _ISR_Flash( level );
+
+ if ( _Thread_Is_heir( executing ) )
+ _Thread_Heir = (Thread_Control *) ready->first;
+ _Thread_Dispatch_necessary = TRUE;
+ }
+ else if ( !_Thread_Is_heir( executing ) )
+ _Thread_Dispatch_necessary = TRUE;
+
+ _ISR_Enable( level );
+
+}
+
+void _Scheduler_edf_Enqueue( Thread_Control *the_thread) {
+ RBT_Node *node = (RBT_Node*)the_thread->scheduler_info;
+ EDF_Chain_Control *chain = node->ready_chain;
+ //FIXME: instead of this hack for idle task, make up a general rule
+ if (node->rel_deadline == 255)
+ node->abs_deadline = ABS_DEADLINE_MAXIMUM;
+ else
+ node->abs_deadline = _Watchdog_Ticks_since_boot + node->rel_deadline;
+ _RBT_Insert(chain,the_thread);
+
+}
+
+void _Scheduler_edf_Enqueue_first( Thread_Control *the_thread) {
+ // FIXME: force first position
+ _Scheduler_edf_Enqueue(the_thread);
+}
+
+void _Scheduler_edf_Extract( Thread_Control *the_thread) {
+ EDF_Chain_Control* chain = ((RBT_Node*)the_thread->scheduler_info)->ready_chain;
+ _RBT_Extract(chain,the_thread);
+}
+
-/**
- * @file rtems/score/schedulerpriority.h
- *
- * This include file contains all the constants and structures associated
- * with the manipulation of threads for the priority-based scheduler.
- */
-
-/*
- * Copryight (c) 2010 Gedare Bloom.
- * 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: schedulerpriority.h,v 1.8 2011/03/08 19:27:35 joel Exp $
- */
+#ifndef _SCHEDULER_EDF_H
+#define _SCHEDULER_EDF_H
-#ifndef _RTEMS_SCORE_SCHEDULERPRIORITY_H
-#define _RTEMS_SCORE_SCHEDULERPRIORITY_H
-
-#include <rtems/score/chain.h>
-#include <rtems/score/priority.h>
#include <rtems/score/scheduler.h>
+#include <rtems/score/chain.h>
+#include <rtems/score/thread.h>
+#include "edf_types.h"
+#include "rbtree.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+// keeps the ready queue for EDF
+EDF_Chain_Control _Thread_Ready_EDF_chain;
-/**
- * @addtogroup ScoreScheduler
- *
- */
-/**@{*/
+#define SCHEDULER_EDF_ENTRY_POINTS \
+ { \
+ _Scheduler_edf_Initialize, /* initialize entry point */ \
+ _Scheduler_edf_Schedule, /* schedule entry point */ \
+ _Scheduler_edf_Yield, /* yield entry point */ \
+ _Scheduler_edf_Block, /* block entry point */ \
+ _Scheduler_edf_Unblock, /* unblock entry point */ \
+ _Scheduler_edf_Allocate, /* allocate entry point */ \
+ _Scheduler_edf_Free, /* free entry point */ \
+ _Scheduler_edf_Update, /* update entry point */ \
+ _Scheduler_edf_Enqueue, /* enqueue entry point */ \
+ _Scheduler_edf_Enqueue_first, /* enqueue_first entry point */ \
+ _Scheduler_edf_Extract /* extract entry point */ \
+ }
-/**
- * Entry points for the Deterministic Priority Based Scheduler.
- */
-#define SCHEDULER_PRIORITY_ENTRY_POINTS \
- { \
- _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 */ \
- }
-
-/**
- * Per-thread data related to the _Scheduler_PRIORITY scheduling policy.
- */
-typedef struct {
- /** This field points to the Ready FIFO for this thread's priority. */
- Chain_Control *ready_chain;
- /** This field contains precalculated priority map indices. */
- Priority_bit_map_Information Priority_map;
-} Scheduler_priority_Per_thread;
/**
* This routine initializes the priority scheduler.
*/
-void _Scheduler_priority_Initialize(void);
+void _Scheduler_edf_Initialize(void);
/**
* This routine removes @a the_thread from the scheduling decision,
*
* @param[in] the_thread is the thread to be blocked
*/
-void _Scheduler_priority_Block(
+void _Scheduler_edf_Block(
Thread_Control *the_thread
);
* This kernel routine sets the heir thread to be the next ready thread
* by invoking the_scheduler->ready_queue->operations->first().
*/
-void _Scheduler_priority_Schedule(void);
+void _Scheduler_edf_Schedule(void);
/**
* This routine allocates @a the_thread->scheduler.
* @param[in] the_thread is the thread the scheduler is allocating
* management memory for
*/
-void * _Scheduler_priority_Allocate(
+void * _Scheduler_edf_Allocate(
Thread_Control *the_thread
);
* @param[in] the_thread is the thread whose scheduler specific information
* will be deallocated.
*/
-void _Scheduler_priority_Free(
+void _Scheduler_edf_Free(
Thread_Control *the_thread
);
* @param[in] the_thread will have its scheduler specific information
* structure updated.
*/
-void _Scheduler_priority_Update(
+void _Scheduler_edf_Update(
Thread_Control *the_thread
);
*
* @param[in] the_thread will be unblocked
*/
-void _Scheduler_priority_Unblock(
+void _Scheduler_edf_Unblock(
Thread_Control *the_thread
);
* timeslice counter is reset. The heir THREAD will be updated if the
* running is also the currently the heir.
*/
-void _Scheduler_priority_Yield( void );
+void _Scheduler_edf_Yield( void );
/**
* This routine puts @a the_thread on to the priority-based ready queue.
*
* @param[in] the_thread will be enqueued at the TAIL of its priority.
*/
-void _Scheduler_priority_Enqueue(
+void _Scheduler_edf_Enqueue(
Thread_Control *the_thread
);
*
* @param[in] the_thread will be enqueued at the HEAD of its priority.
*/
-void _Scheduler_priority_Enqueue_first(
+void _Scheduler_edf_Enqueue_first(
Thread_Control *the_thread
);
*
* @param[in] the_thread will be extracted from the ready set.
*/
-void _Scheduler_priority_Extract(
+void _Scheduler_edf_Extract(
Thread_Control *the_thread
);
-/**
- * This is the major bit map.
- */
-extern volatile Priority_bit_map_Control _Priority_Major_bit_map;
-
-/**
- * This is the minor bit map.
- */
-extern Priority_bit_map_Control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/schedulerpriority.inl>
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-/**@}*/
-#endif
-/* end of include file */
+#endif /*_SCHEDULER_EDF_H*/
\ No newline at end of file