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

4.115
Last change on this file since a344308 was a344308, checked in by Sebastian Huber <sebastian.huber@…>, on 06/06/13 at 13:32:22

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
RevLine 
[ba7bc099]1/**
2 *  @file  rtems/score/schedulersimplesmp.h
3 *
[a1f9934a]4 *  @brief Manipulation of Threads on a Simple-Priority-Based Ready Queue
5 *
[ba7bc099]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/**
[a15eaaf]26 *  @defgroup ScoreSchedulerSMP Simple SMP Scheduler
[a1f9934a]27 *
[a15eaaf]28 *  @ingroup ScoreScheduler
[ba7bc099]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>
[ac9d2ecc]45#include <rtems/score/schedulerpriority.h>
[ba7bc099]46
47/**
48 *  Entry points for Scheduler Simple SMP
49 */
50#define SCHEDULER_SIMPLE_SMP_ENTRY_POINTS \
51  { \
[ac9d2ecc]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 */ \
[a344308]65    _Scheduler_default_Tick               /* tick entry point */ \
[ba7bc099]66  }
67
68/**
[a1f9934a]69 *  @brief Allocates ready SMP threads to individual cores in an SMP system.
[ba7bc099]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
[dacdda30]73 *  a dispatch, then the dispatch needed flag for that core is set.
[ba7bc099]74 */
75void _Scheduler_simple_smp_Schedule( void );
76
77/**
[a1f9934a]78 *  @brief Remove SMP @a the_thread from the ready queue.
[ba7bc099]79 *
[dacdda30]80 *  This routine removes @a the_thread from the scheduling decision,
[ba7bc099]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 */
[dacdda30]87void _Scheduler_simple_smp_Block(
88  Thread_Control *the_thread
[ba7bc099]89);
90
91/**
[a1f9934a]92 *  @brief Adds SMP @a the_thread to the ready queue and updates any
93 *  appropriate scheduling variables, for example the heir thread.
[ba7bc099]94 *
[dacdda30]95 *  This routine adds @a the_thread to the scheduling decision,
[ba7bc099]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(
[dacdda30]102  Thread_Control *the_thread
[ba7bc099]103);
104
105#ifdef __cplusplus
106}
107#endif
108
109/**@}*/
110
111#endif
[a15eaaf]112/* end of include file */
Note: See TracBrowser for help on using the repository browser.