source: rtems/cpukit/score/src/schedulerpriority.c @ 5c4e0c5

4.11
Last change on this file since 5c4e0c5 was 5c4e0c5, checked in by Sebastian Huber <sebastian.huber@…>, on Nov 25, 2010 at 1:24:26 PM

2010-11-25 Sebastian Huber <sebastian.huber@…>

  • sapi/include/confdefs.h, score/include/rtems/score/scheduler.h, score/inline/rtems/score/scheduler.inl, score/inline/rtems/score/schedulerpriority.inl, score/src/schedulerpriority.c, score/src/schedulerprioritythreadschedulerallocate.c, score/src/schedulerprioritythreadschedulerfree.c, score/src/schedulerprioritythreadschedulerupdate.c, score/src/schedulerpriorityyield.c: Added attribute unused. Renamed types and fields to follow the Score naming conventions.
  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 *  Scheduler Handler
3 *
4 *  Copyright (C) 2010 Gedare Bloom.
5 *
6 *  The license and distribution terms for this file may be
7 *  found in the file LICENSE in this distribution or at
8 *  http://www.rtems.com/license/LICENSE.
9 *
10 *  $Id$
11 */
12
13#if HAVE_CONFIG_H
14#include "config.h"
15#endif
16
17#include <rtems/system.h>
18#include <rtems/config.h>
19#include <rtems/score/chain.h>
20#include <rtems/score/isr.h>
21#include <rtems/score/object.h>
22#include <rtems/score/scheduler.h>
23#include <rtems/score/schedulerpriority.h>
24#include <rtems/score/states.h>
25#include <rtems/score/thread.h>
26
27/* Instantiate any global variables needed by the priority scheduler */
28volatile Priority_bit_map_Control _Priority_Major_bit_map;
29
30Priority_bit_map_Control          _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
31
32/*
33 *  _Scheduler_priority_Initialize
34 *
35 * Initializes the scheduler for priority scheduling.
36 *
37 *  Input parameters:
38 *    the_scheduler - pointer to scheduler control
39 *
40 *  Output parameters: NONE
41 */
42
43void _Scheduler_priority_Initialize (
44    Scheduler_Control       *the_scheduler
45)
46{
47  /* the operations table is a jump table to redirect generic scheduler
48   * function calls to scheduler implementation specific functions.  The
49   * main purpose of scheduler initialization is to set up the jump table
50   * for the scheduler.  Every scheduler implementation provides its own
51   * scheduler operations table.
52   */
53  the_scheduler->Operations.schedule           = &_Scheduler_priority_Schedule;
54  the_scheduler->Operations.yield              = &_Scheduler_priority_Yield;
55  the_scheduler->Operations.block              = &_Scheduler_priority_Block;
56  the_scheduler->Operations.unblock            = &_Scheduler_priority_Unblock;
57  the_scheduler->Operations.scheduler_allocate = 
58      &_Scheduler_priority_Thread_scheduler_allocate;
59  the_scheduler->Operations.scheduler_free     = 
60      &_Scheduler_priority_Thread_scheduler_free;
61  the_scheduler->Operations.scheduler_update   = 
62      &_Scheduler_priority_Thread_scheduler_update;
63
64  _Scheduler_priority_Ready_queue_initialize( the_scheduler );
65  _Priority_bit_map_Handler_initialization( );
66}
Note: See TracBrowser for help on using the repository browser.