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

4.115
Last change on this file since a15eaaf was a15eaaf, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 10, 2013 at 7:20:34 PM

cpukit: Doxygen group fixes and many warnings addressed

The output of the modules.html is much improved. Most
filesystem and POSIX API related groups are properly nested.
Some formatting issues were addressed as were multiple
inconsistencies.

  • Property mode set to 100644
File size: 4.1 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_simple_smp_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/**
106 *  @brief Invoked as part of processing each SMP clock tick.
107 *
108 *  This routine is invoked as part of processing each clock tick.
109 *  It is responsible for determining if the current thread allows
110 *  timeslicing and, if so, when its timeslice expires.
111 */
112void _Scheduler_simple_smp_Tick( void );
113
114#ifdef __cplusplus
115}
116#endif
117
118/**@}*/
119
120#endif
121/* end of include file */
Note: See TracBrowser for help on using the repository browser.