source: rtems/cpukit/score/src/scheduleredfyield.c @ 24934e36

4.115
Last change on this file since 24934e36 was 24934e36, checked in by Sebastian Huber <sebastian.huber@…>, on 04/03/14 at 13:03:35

score: Add scheduler control to scheduler ops

Scheduler operations must be free of a global scheduler context to
enable partitioned/clustered scheduling.

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[f839bf5a]1/**
2 * @file
3 *
4 * @brief Scheduler EDF Yield
5 *
6 * @ingroup ScoreScheduler
7 */
8
[5472ad41]9/*
10 *  Copyright (C) 2011 Petr Benes.
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
[c499856]15 *  http://www.rtems.org/license/LICENSE.
[5472ad41]16 */
17
18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
[e5ca54c9]22#include <rtems/score/scheduleredfimpl.h>
[5472ad41]23
[24934e36]24void _Scheduler_EDF_Yield(
25  Scheduler_Control *scheduler_base,
26  Thread_Control    *the_thread
27)
[5472ad41]28{
[3891983]29  Scheduler_EDF_Control *scheduler =
[24934e36]30    _Scheduler_EDF_Self_from_base( scheduler_base );
[3891983]31  ISR_Level              level;
[5472ad41]32
[6eba7c85]33  Scheduler_EDF_Per_thread *thread_info =
[24934e36]34    (Scheduler_EDF_Per_thread *) the_thread->scheduler_info;
[6eba7c85]35  RBTree_Node *thread_node = &(thread_info->Node);
[5472ad41]36
37  _ISR_Disable( level );
38
[40ee2fc0]39  /*
40   * The RBTree has more than one node, enqueue behind the tasks
41   * with the same priority in case there are such ones.
42   */
[3891983]43  _RBTree_Extract( &scheduler->Ready, thread_node );
44  _RBTree_Insert( &scheduler->Ready, thread_node );
[40ee2fc0]45
46  _ISR_Flash( level );
47
[24934e36]48  _Scheduler_EDF_Schedule_body( scheduler_base, the_thread, false );
[5472ad41]49
50  _ISR_Enable( level );
51}
Note: See TracBrowser for help on using the repository browser.