source: rtems/cpukit/score/src/scheduleredfyield.c @ ca1e546e

5
Last change on this file since ca1e546e was ca1e546e, checked in by Sebastian Huber <sebastian.huber@…>, on 02/02/17 at 15:24:05

score: Improve scheduler helping protocol

Only register ask for help requests in the scheduler unblock and yield
operations. The actual ask for help operation is carried out during
_Thread_Do_dispatch() on a processor related to the thread. This yields
a better separation of scheduler instances. A thread of one scheduler
instance should not be forced to carry out too much work for threads on
other scheduler instances.

Update #2556.

  • Property mode set to 100644
File size: 941 bytes
Line 
1/**
2 * @file
3 *
4 * @brief Scheduler EDF Yield
5 *
6 * @ingroup ScoreScheduler
7 */
8
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
15 *  http://www.rtems.org/license/LICENSE.
16 */
17
18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#include <rtems/score/scheduleredfimpl.h>
23
24void _Scheduler_EDF_Yield(
25  const Scheduler_Control *scheduler,
26  Thread_Control          *the_thread,
27  Scheduler_Node          *node
28)
29{
30  Scheduler_EDF_Context *context;
31  Scheduler_EDF_Node    *the_node;
32
33  context = _Scheduler_EDF_Get_context( scheduler );
34  the_node = _Scheduler_EDF_Node_downcast( node );
35
36  _Scheduler_EDF_Extract( context, the_node );
37  _Scheduler_EDF_Enqueue( context, the_node, the_node->priority );
38  _Scheduler_EDF_Schedule_body( scheduler, the_thread, true );
39}
Note: See TracBrowser for help on using the repository browser.