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

4.115
Last change on this file since c5a4332 was c5a4332, checked in by Joel Sherrill <joel.sherrill@…>, on 06/28/11 at 20:31:36

2011-06-28 Joel Sherrill <joel.sherrill@…>

  • score/Makefile.am, score/include/rtems/score/schedulersimplesmp.h, score/src/schedulersimplesmptick.c: Build schedulersimplesmptick.c and fix typos.
  • Property mode set to 100644
File size: 3.6 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
44/**
45 *  Entry points for Scheduler Simple SMP
46 */
47#define SCHEDULER_SIMPLE_SMP_ENTRY_POINTS \
48  { \
49    _Scheduler_simple_Initialize,    /* initialize entry point */ \
50    _Scheduler_simple_smp_Schedule,  /* schedule entry point */ \
51    _Scheduler_simple_Yield,         /* yield entry point */ \
52    _Scheduler_simple_smp_Block,     /* block entry point */ \
53    _Scheduler_simple_smp_Unblock,   /* unblock entry point */ \
54    _Scheduler_simple_Allocate,      /* allocate entry point */ \
55    _Scheduler_simple_Free,          /* free entry point */ \
56    _Scheduler_simple_Update,        /* update entry point */ \
57    _Scheduler_simple_Enqueue,       /* enqueue entry point */ \
58    _Scheduler_simple_Enqueue_first, /* enqueue_first entry point */ \
59    _Scheduler_simple_Extract,       /* extract entry point */ \
60    _Scheduler_simple_smp_Tick       /* tick entry point */ \
61  }
62
63/**
64 *  @brief Scheduler Simple SMP Schedule Method
65 *
66 *  This routine allocates ready threads to individual cores in an SMP
67 *  system.  If the allocation results in a new heir which requires
68 *  a dispatch, then the dispatch needed flag for that core is set.
69 */
70void _Scheduler_simple_smp_Schedule( void );
71
72/**
73 *  @brief Scheduler Simple SMP Block Method
74 *
75 *  This routine removes @a the_thread from the scheduling decision,
76 *  that is, removes it from the ready queue.  It performs
77 *  any necessary scheduling operations including the selection of
78 *  a new heir thread.
79 *
80 *  @param[in] the_thread is the thread that is to be blocked
81 */
82void _Scheduler_simple_smp_Block(
83  Thread_Control *the_thread
84);
85
86/**
87 *  @brief Scheduler Simple SMP Unblock Method
88 *
89 *  This routine adds @a the_thread to the scheduling decision,
90 *  that is, adds it to the ready queue and updates any appropriate
91 *  scheduling variables, for example the heir thread.
92 *
93 *  @param[in] the_thread is the thread that is to be unblocked
94 */
95void _Scheduler_simple_smp_Unblock(
96  Thread_Control *the_thread
97);
98
99/**
100 *  @brief Scheduler Simple SMP Tick Method
101 *
102 *  This routine is invoked as part of processing each clock tick.
103 *  It is responsible for determining if the current thread allows
104 *  timeslicing and, if so, when its timeslice expires.
105 */
106void _Scheduler_simple_smp_Tick( void );
107
108#ifdef __cplusplus
109}
110#endif
111
112/**@}*/
113
114#endif
115/* end of include file */
Note: See TracBrowser for help on using the repository browser.