source: rtems/cpukit/score/include/rtems/score/schedulerpriority.h @ 0faa9dad

4.115
Last change on this file since 0faa9dad was 0faa9dad, checked in by Joel Sherrill <joel.sherrill@…>, on 11/24/10 at 15:51:28

2010-11-24 Gedare Bloom <giddyup44@…>

PR 1647/cpukit

  • posix/src/nanosleep.c, posix/src/sched_yield.c, rtems/src/taskwakeafter.c, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/src/exinit.c, score/Makefile.am, score/preinstall.am, score/include/rtems/score/prioritybitmap.h, score/include/rtems/score/thread.h, score/inline/rtems/score/thread.inl, score/src/thread.c, score/src/threadchangepriority.c, score/src/threadclearstate.c, score/src/threadclose.c, score/src/threadinitialize.c, score/src/threadready.c, score/src/threadresume.c, score/src/threadsetpriority.c, score/src/threadsetstate.c, score/src/threadsettransient.c, score/src/threadsuspend.c, score/src/threadtickletimeslice.c: Refactor scheduler out of thread handler to facilitate alternate scheduler implementations.
  • score/src/threadyieldprocessor.c: Removed.
  • score/src/schedulerprioritythreadschedulerupdate.c, score/src/schedulerprioritythreadschedulerfree.c, score/src/schedulerpriorityblock.c, score/src/scheduler.c, score/src/schedulerprioritythreadschedulerallocate.c, score/src/schedulerpriorityunblock.c, score/src/schedulerpriority.c, score/src/schedulerpriorityyield.c, score/include/rtems/score/schedulerpriority.h, score/include/rtems/score/scheduler.h, score/inline/rtems/score/scheduler.inl, score/inline/rtems/score/schedulerpriority.inl: New files.
  • Property mode set to 100644
File size: 2.7 KB
Line 
1/**
2 *  @file  rtems/score/schedulerpriority.h
3 *
4 *  This include file contains all the constants and structures associated
5 *  with the manipulation of threads for the priority-based scheduler.
6 */
7
8/*
9 *  Copryight (c) 2010 Gedare Bloom.
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.com/license/LICENSE.
14 *
15 *  $Id$
16 */
17
18#ifndef _RTEMS_SCORE_SCHEDULERPRIORITY_H
19#define _RTEMS_SCORE_SCHEDULERPRIORITY_H
20
21/**
22 *  @addtogroup ScoreScheduler
23 *
24 */
25/**@{*/
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#include <rtems/score/chain.h>
32#include <rtems/score/priority.h>
33#include <rtems/score/percpu.h>
34#include <rtems/score/scheduler.h>
35#include <rtems/score/wkspace.h>
36
37/**
38 * This routine initializes the priority scheduler.
39 */
40void _Scheduler_priority_Initialize(
41    Scheduler_Control    *the_scheduler
42);
43
44/**
45 *  This routine removes @a the_thread from the scheduling decision,
46 *  that is, removes it from the ready queue.  It performs
47 *  any necessary scheduling operations including the selection of
48 *  a new heir thread.
49 */
50void _Scheduler_priority_Block(
51    Scheduler_Control *the_scheduler,
52    Thread_Control    *the_thread
53);
54
55/**
56 *  This kernel routine sets the heir thread to be the next ready thread
57 *  by invoking the_scheduler->ready_queue->operations->first().
58 */
59void _Scheduler_priority_Schedule(
60    Scheduler_Control *the_scheduler
61);
62
63/**
64 * This routine allocates @a the_thread->scheduler.
65 */
66void * _Scheduler_priority_Thread_scheduler_allocate(
67    Scheduler_Control   *the_scheduler,
68    Thread_Control      *the_thread
69);
70
71/**
72 * This routine frees @a the_thread->scheduler.
73 */
74void _Scheduler_priority_Thread_scheduler_free(
75    Scheduler_Control   *the_scheduler,
76    Thread_Control      *the_thread
77);
78
79/**
80 * This routine updates @a the_thread->scheduler based on @a the_scheduler
81 * structures and thread state
82 */
83void _Scheduler_priority_Thread_scheduler_update(
84    Scheduler_Control   *the_scheduler,
85    Thread_Control      *the_thread
86);
87
88/**
89 *  This routine adds @a the_thread to the scheduling decision,
90 *  that is, adds it to the ready queue and
91 *  updates any appropriate scheduling variables, for example the heir thread.
92 */
93void _Scheduler_priority_Unblock(
94    Scheduler_Control *the_scheduler,
95    Thread_Control    *the_thread
96);
97
98/**
99 *  This routine is invoked when a thread wishes to voluntarily
100 *  transfer control of the processor to another thread in the queue.
101 */
102void _Scheduler_priority_Yield(
103    Scheduler_Control *the_scheduler
104);
105
106#ifndef __RTEMS_APPLICATION__
107#include <rtems/score/schedulerpriority.inl>
108#endif
109
110#ifdef __cplusplus
111}
112#endif
113
114/**@}*/
115
116#endif
117/* end of include file */
Note: See TracBrowser for help on using the repository browser.