RTEMS
scheduler.c
Go to the documentation of this file.
1 
9 /*
10  * Copyright (C) 2010 Gedare Bloom.
11  * Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
12  *
13  * The license and distribution terms for this file may be
14  * found in the file LICENSE in this distribution or at
15  * http://www.rtems.org/license/LICENSE.
16  */
17 
18 #ifdef HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21 
23 
25 {
26  size_t n;
27  size_t i;
28 
29  n = _Scheduler_Count;
30 
31  for ( i = 0 ; i < n ; ++i ) {
32  const Scheduler_Control *scheduler;
33 #if defined(RTEMS_SMP)
34  Scheduler_Context *context;
35 #endif
36 
37  scheduler = &_Scheduler_Table[ i ];
38 #if defined(RTEMS_SMP)
39  context = _Scheduler_Get_context( scheduler );
40 #endif
41  _ISR_lock_Initialize( &context->Lock, "Scheduler" );
42  ( *scheduler->Operations.initialize )( scheduler );
43  }
44 }
Scheduler context.
Definition: scheduler.h:247
Inlined Routines Associated with the Manipulation of the Scheduler.
void _Scheduler_Handler_initialization(void)
Initializes the scheduler to the policy chosen by the user.
Definition: scheduler.c:24
const Scheduler_Control _Scheduler_Table[]
This table contains the configured schedulers.
Scheduler_Operations Operations
The scheduler operations.
Definition: scheduler.h:273
const size_t _Scheduler_Count
This constant contains the count of configured schedulers.
Scheduler control.
Definition: scheduler.h:264
static __inline__ Scheduler_Context * _Scheduler_Get_context(const Scheduler_Control *scheduler)
Gets the context of the scheduler.
Definition: schedulerimpl.h:85
#define _ISR_lock_Initialize(_lock, _name)
Initializes an ISR lock.
Definition: isrlock.h:182
void(* initialize)(const Scheduler_Control *)
Definition: scheduler.h:45