source: rtems/cpukit/score/src/schedulercbsnodeinit.c @ fce900b5

5
Last change on this file since fce900b5 was 300f6a48, checked in by Sebastian Huber <sebastian.huber@…>, on 06/22/16 at 15:09:23

score: Rework thread priority management

Add priority nodes which contribute to the overall thread priority.

The actual priority of a thread is now an aggregation of priority nodes.
The thread priority aggregation for the home scheduler instance of a
thread consists of at least one priority node, which is normally the
real priority of the thread. The locking protocols (e.g. priority
ceiling and priority inheritance), rate-monotonic period objects and the
POSIX sporadic server add, change and remove priority nodes.

A thread changes its priority now immediately, e.g. priority changes are
not deferred until the thread releases its last resource.

Replace the _Thread_Change_priority() function with

  • _Thread_Priority_perform_actions(),
  • _Thread_Priority_add(),
  • _Thread_Priority_remove(),
  • _Thread_Priority_change(), and
  • _Thread_Priority_update().

Update #2412.
Update #2556.

  • Property mode set to 100644
File size: 863 bytes
Line 
1/*
2 *  @file
3 *
4 *  @brief Scheduler CBS Allocate
5 *  @ingroup ScoreScheduler
6 */
7
8/*
9 *  Copyright (C) 2011 Petr Benes.
10 *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/score/schedulercbsimpl.h>
22
23void _Scheduler_CBS_Node_initialize(
24  const Scheduler_Control *scheduler,
25  Scheduler_Node          *node,
26  Thread_Control          *the_thread,
27  Priority_Control         priority
28)
29{
30  Scheduler_CBS_Node *the_node;
31
32  _Scheduler_EDF_Node_initialize( scheduler, node, the_thread, priority );
33
34  the_node = _Scheduler_CBS_Node_downcast( node );
35  the_node->cbs_server = NULL;
36  the_node->deadline_node = NULL;
37}
Note: See TracBrowser for help on using the repository browser.