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

4.11
Last change on this file since a344308 was a344308, checked in by Sebastian Huber <sebastian.huber@…>, on Jun 6, 2013 at 1:32:22 PM

scheduler: Add and use _Scheduler_default_Tick()

Delete _Scheduler_priority_Tick(). Use _SMP_Get_processor_count() for
default tick operation. Delete _Scheduler_simple_smp_Tick().

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