source: rtems/cpukit/score/include/rtems/score/schedulersimplesmp.h @ ac9d2ecc

4.115
Last change on this file since ac9d2ecc was ac9d2ecc, checked in by Joel Sherrill <joel.sherrill@…>, on 09/01/11 at 18:13:54

2011-09-01 Petr Benes <benesp16@…>

PR 1895/cpukit

  • rtems/src/ratemoncancel.c, rtems/src/ratemondelete.c, rtems/src/ratemonperiod.c, sapi/include/confdefs.h, score/Makefile.am, score/include/rtems/score/scheduler.h, score/include/rtems/score/schedulerpriority.h, score/include/rtems/score/schedulersimple.h, score/include/rtems/score/schedulersimplesmp.h, score/inline/rtems/score/scheduler.inl, score/inline/rtems/score/schedulerpriority.inl, score/src/coremutexseize.c: Add priority_compare and release_job hooks interfaces to scheduler interface.
  • score/src/schedulerpriorityprioritycompare.c, score/src/schedulerpriorityreleasejob.c: New files.
  • Property mode set to 100644
File size: 3.8 KB
Line 
1/**
2 *  @file  rtems/score/schedulersimplesmp.h
3 *
4 *  This include file contains all the constants and structures associated
5 *  with the manipulation of threads on a simple-priority-based ready queue.
6 *  This implementation is SMP-aware and schedules across multiple cores.
7 *
8 *  The implementation relies heavily on the Simple Scheduler and
9 *  only replaces a few routines from that scheduler.
10 */
11
12/*
13 *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
14 *
15 *  The license and distribution terms for this file may be
16 *  found in the file LICENSE in this distribution or at
17 *  http://www.rtems.com/license/LICENSE.
18 *
19 *  $Id$
20 */
21
22#ifndef _RTEMS_SCORE_SCHEDULERSIMPLE_SMP_H
23#define _RTEMS_SCORE_SCHEDULERSIMPLE_SMP_H
24
25/**
26 *  @addtogroup ScoreScheduler
27 *
28 *  The Simple SMP Scheduler attempts to faithfully implement the
29 *  behaviour of the Deterministic Priority Scheduler while spreading
30 *  the threads across multiple cores.  It takes into account thread
31 *  priority, preemption, and how long a thread has been executing
32 *  on a core as factors.  From an implementation perspective, it
33 *  relies heavily on the Simple Priority Scheduler.
34 */
35/**@{*/
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41#include <rtems/score/scheduler.h>
42#include <rtems/score/schedulersimple.h>
43#include <rtems/score/schedulerpriority.h>
44
45/**
46 *  Entry points for Scheduler Simple SMP
47 */
48#define SCHEDULER_SIMPLE_SMP_ENTRY_POINTS \
49  { \
50    _Scheduler_simple_Initialize,         /* initialize entry point */ \
51    _Scheduler_simple_smp_Schedule,       /* schedule entry point */ \
52    _Scheduler_simple_Yield,              /* yield entry point */ \
53    _Scheduler_simple_smp_Block,          /* block entry point */ \
54    _Scheduler_simple_smp_Unblock,        /* unblock entry point */ \
55    _Scheduler_simple_Allocate,           /* allocate entry point */ \
56    _Scheduler_simple_Free,               /* free entry point */ \
57    _Scheduler_simple_Update,             /* update entry point */ \
58    _Scheduler_simple_Enqueue,            /* enqueue entry point */ \
59    _Scheduler_simple_Enqueue_first,      /* enqueue_first entry point */ \
60    _Scheduler_simple_Extract,            /* extract entry point */ \
61    _Scheduler_priority_Priority_compare, /* compares two priorities */ \
62    _Scheduler_priority_Release_job,      /* new period of task */ \
63    _Scheduler_simple_smp_Tick            /* tick entry point */ \
64  }
65
66/**
67 *  @brief Scheduler Simple SMP Schedule Method
68 *
69 *  This routine allocates ready threads to individual cores in an SMP
70 *  system.  If the allocation results in a new heir which requires
71 *  a dispatch, then the dispatch needed flag for that core is set.
72 */
73void _Scheduler_simple_smp_Schedule( void );
74
75/**
76 *  @brief Scheduler Simple SMP Block Method
77 *
78 *  This routine removes @a the_thread from the scheduling decision,
79 *  that is, removes it from the ready queue.  It performs
80 *  any necessary scheduling operations including the selection of
81 *  a new heir thread.
82 *
83 *  @param[in] the_thread is the thread that is to be blocked
84 */
85void _Scheduler_simple_smp_Block(
86  Thread_Control *the_thread
87);
88
89/**
90 *  @brief Scheduler Simple SMP Unblock Method
91 *
92 *  This routine adds @a the_thread to the scheduling decision,
93 *  that is, adds it to the ready queue and updates any appropriate
94 *  scheduling variables, for example the heir thread.
95 *
96 *  @param[in] the_thread is the thread that is to be unblocked
97 */
98void _Scheduler_simple_smp_Unblock(
99  Thread_Control *the_thread
100);
101
102/**
103 *  @brief Scheduler Simple SMP Tick Method
104 *
105 *  This routine is invoked as part of processing each clock tick.
106 *  It is responsible for determining if the current thread allows
107 *  timeslicing and, if so, when its timeslice expires.
108 */
109void _Scheduler_simple_smp_Tick( void );
110
111#ifdef __cplusplus
112}
113#endif
114
115/**@}*/
116
117#endif
118/* end of include file */
Note: See TracBrowser for help on using the repository browser.